Fix some scripting issues

This commit is contained in:
Reinier Criel 2025-11-19 13:15:39 -08:00
parent 2158478894
commit 97bbc77162
11 changed files with 129 additions and 53 deletions

View file

@ -36,7 +36,8 @@ if (command === "setup") {
// Pass remaining arguments to runCommand
const runArgs = process.argv.slice(3);
runCommand(runArgs);
} else if (command === "generate-cert") {
} else if (command === "_generate-cert") {
// Internal command for installer
// Pass remaining arguments to generateCertCommand
const certArgs = process.argv.slice(3);
generateCertCommand(certArgs);
@ -59,9 +60,7 @@ function writeHelp() {
ui.writeInformation(
`Available commands: ${chalk.cyan("setup")}, ${chalk.cyan(
"teardown"
)}, ${chalk.cyan("setup-ci")}, ${chalk.cyan("run")}, ${chalk.cyan(
"generate-cert"
)}, ${chalk.cyan("help")}, ${chalk.cyan("--version")}`
)}, ${chalk.cyan("setup-ci")}, ${chalk.cyan("run")}, ${chalk.cyan("help")}, ${chalk.cyan("--version")}`
);
ui.emptyLine();
ui.writeInformation(
@ -84,11 +83,6 @@ function writeHelp() {
"safe-chain run"
)}: Run the proxy as a standalone service. Sets system-wide proxy environment variables. Options: --verbose`
);
ui.writeInformation(
`- ${chalk.cyan(
"safe-chain generate-cert"
)}: Generate CA certificate for MITM proxy. Options: --output <directory>`
);
ui.writeInformation(
`- ${chalk.cyan(
"safe-chain --version"