auroq-os 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/auroq-os.js +17 -0
- package/package.json +1 -1
package/bin/auroq-os.js
CHANGED
|
@@ -59,6 +59,23 @@ async function init() {
|
|
|
59
59
|
|
|
60
60
|
const targetDir = process.cwd();
|
|
61
61
|
const sourceDir = path.resolve(__dirname, '..');
|
|
62
|
+
const homeDir = require('os').homedir();
|
|
63
|
+
|
|
64
|
+
// ─── PROTECAO: Nunca instalar na home do usuario
|
|
65
|
+
if (targetDir === homeDir || targetDir === path.resolve(homeDir)) {
|
|
66
|
+
error('');
|
|
67
|
+
error(`${GOLD}ATENCAO: Voce esta na pasta HOME do seu usuario (${targetDir}).${RESET}`);
|
|
68
|
+
error(`${GOLD}O Auroq OS nao pode ser instalado aqui — vai baguncar seu sistema.${RESET}`);
|
|
69
|
+
error('');
|
|
70
|
+
error('Crie uma pasta pro seu projeto e rode o comando de dentro dela:');
|
|
71
|
+
error('');
|
|
72
|
+
error(` ${CYAN}mkdir meu-negocio${RESET}`);
|
|
73
|
+
error(` ${CYAN}cd meu-negocio${RESET}`);
|
|
74
|
+
error(` ${CYAN}npx auroq-os init${RESET}`);
|
|
75
|
+
error('');
|
|
76
|
+
error('Troque "meu-negocio" pelo nome que quiser pro seu projeto.');
|
|
77
|
+
process.exit(1);
|
|
78
|
+
}
|
|
62
79
|
|
|
63
80
|
log(`${DIM}Instalando em: ${targetDir}${RESET}\n`);
|
|
64
81
|
|