mirror of
https://github.com/codex-storage/cli.git
synced 2025-02-28 16:40:43 +00:00
Displays default config after successful install.
This commit is contained in:
parent
e26b65daf6
commit
b9d6fd70b9
@ -75,9 +75,10 @@ export async function installCodex(config, showNavigationMenu) {
|
||||
console.log(chalk.green('Codex is already installed. Version:'));
|
||||
console.log(chalk.green(version));
|
||||
await showNavigationMenu();
|
||||
return false;
|
||||
} else {
|
||||
console.log(chalk.cyanBright('Codex is not installed, proceeding with installation...'));
|
||||
await performInstall(config, showNavigationMenu);
|
||||
return await performInstall(config);
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,12 +100,11 @@ async function clearCodexExePathFromConfig(config) {
|
||||
saveConfig(config);
|
||||
}
|
||||
|
||||
async function performInstall(config, showNavigationMenu) {
|
||||
async function performInstall(config) {
|
||||
const agreed = await showPrivacyDisclaimer();
|
||||
if (!agreed) {
|
||||
console.log(showInfoMessage('You can find manual setup instructions at docs.codex.storage'));
|
||||
process.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
const installPath = getCodexBinPath();
|
||||
@ -202,11 +202,11 @@ async function performInstall(config, showNavigationMenu) {
|
||||
));
|
||||
|
||||
spinner.success();
|
||||
await showNavigationMenu();
|
||||
return true;
|
||||
} catch (error) {
|
||||
spinner.error();
|
||||
console.log(showErrorMessage(`Failed to install Codex: ${error.message}`));
|
||||
await showNavigationMenu();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,8 @@ export async function runCodex(config, showNavigationMenu) {
|
||||
|
||||
console.log(showInfoMessage(
|
||||
`Data location: ${config.dataDir}\n` +
|
||||
`Logs: ${logFilePath}`
|
||||
`Logs: ${logFilePath}\n` +
|
||||
`API port: ${config.ports.apiPort}`
|
||||
));
|
||||
|
||||
const executable = config.codexExe;
|
||||
|
@ -99,7 +99,10 @@ export async function main() {
|
||||
|
||||
switch (choice.split('.')[0]) {
|
||||
case '1':
|
||||
await installCodex(config, showNavigationMenu);
|
||||
const installed = await installCodex(config, showNavigationMenu);
|
||||
if (installed) {
|
||||
await showConfigMenu(config);
|
||||
}
|
||||
break;
|
||||
case '2':
|
||||
await showConfigMenu(config);
|
||||
|
Loading…
x
Reference in New Issue
Block a user