mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Update commands for ultimate
This commit is contained in:
parent
a016483057
commit
7218d778cf
2 changed files with 27 additions and 21 deletions
|
|
@ -66,14 +66,17 @@ if (tool) {
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
} else if (command === "setup") {
|
} else if (command === "setup") {
|
||||||
setup();
|
setup();
|
||||||
} else if (command === "--ultimate") {
|
} else if (command === "ultimate") {
|
||||||
(async () => {
|
const subCommand = process.argv[3];
|
||||||
await installUltimate();
|
if (subCommand === "uninstall") {
|
||||||
})();
|
(async () => {
|
||||||
} else if (command === "--uninstall-ultimate") {
|
await uninstallUltimate();
|
||||||
(async () => {
|
})();
|
||||||
await uninstallUltimate();
|
} else {
|
||||||
})();
|
(async () => {
|
||||||
|
await installUltimate();
|
||||||
|
})();
|
||||||
|
}
|
||||||
} else if (command === "teardown") {
|
} else if (command === "teardown") {
|
||||||
teardownDirectories();
|
teardownDirectories();
|
||||||
teardown();
|
teardown();
|
||||||
|
|
@ -100,7 +103,7 @@ function writeHelp() {
|
||||||
ui.writeInformation(
|
ui.writeInformation(
|
||||||
`Available commands: ${chalk.cyan("setup")}, ${chalk.cyan(
|
`Available commands: ${chalk.cyan("setup")}, ${chalk.cyan(
|
||||||
"teardown",
|
"teardown",
|
||||||
)}, ${chalk.cyan("setup-ci")}, ${chalk.cyan("help")}, ${chalk.cyan(
|
)}, ${chalk.cyan("setup-ci")}, ${chalk.cyan("ultimate")}, ${chalk.cyan("help")}, ${chalk.cyan(
|
||||||
"--version",
|
"--version",
|
||||||
)}`,
|
)}`,
|
||||||
);
|
);
|
||||||
|
|
@ -110,16 +113,6 @@ function writeHelp() {
|
||||||
"safe-chain setup",
|
"safe-chain setup",
|
||||||
)}: This will setup your shell to wrap safe-chain around npm, npx, yarn, pnpm, pnpx, bun, bunx, pip and pip3.`,
|
)}: This will setup your shell to wrap safe-chain around npm, npx, yarn, pnpm, pnpx, bun, bunx, pip and pip3.`,
|
||||||
);
|
);
|
||||||
ui.writeInformation(
|
|
||||||
`- ${chalk.cyan(
|
|
||||||
"safe-chain --ultimate",
|
|
||||||
)}: This installs the ultimate version of safe-chain, enabling protection for more eco-systems (vscode).`,
|
|
||||||
);
|
|
||||||
ui.writeInformation(
|
|
||||||
`- ${chalk.cyan(
|
|
||||||
"safe-chain --uninstall-ultimate",
|
|
||||||
)}: This uninstalls the ultimate version of safe-chain.`,
|
|
||||||
);
|
|
||||||
ui.writeInformation(
|
ui.writeInformation(
|
||||||
`- ${chalk.cyan(
|
`- ${chalk.cyan(
|
||||||
"safe-chain teardown",
|
"safe-chain teardown",
|
||||||
|
|
@ -136,6 +129,19 @@ function writeHelp() {
|
||||||
)}): Display the current version of safe-chain.`,
|
)}): Display the current version of safe-chain.`,
|
||||||
);
|
);
|
||||||
ui.emptyLine();
|
ui.emptyLine();
|
||||||
|
ui.writeInformation(chalk.bold("Ultimate commands:"));
|
||||||
|
ui.emptyLine();
|
||||||
|
ui.writeInformation(
|
||||||
|
`- ${chalk.cyan(
|
||||||
|
"safe-chain ultimate",
|
||||||
|
)}: Install the ultimate version of safe-chain, enabling protection for more eco-systems.`,
|
||||||
|
);
|
||||||
|
ui.writeInformation(
|
||||||
|
`- ${chalk.cyan(
|
||||||
|
"safe-chain ultimate uninstall",
|
||||||
|
)}: Uninstall the ultimate version of safe-chain.`,
|
||||||
|
);
|
||||||
|
ui.emptyLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getVersion() {
|
async function getVersion() {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ export async function installOnMacOS() {
|
||||||
if (!isRunningAsRoot()) {
|
if (!isRunningAsRoot()) {
|
||||||
ui.writeError("Root privileges required.");
|
ui.writeError("Root privileges required.");
|
||||||
ui.writeInformation("Please run this command with sudo:");
|
ui.writeInformation("Please run this command with sudo:");
|
||||||
ui.writeInformation(" sudo safe-chain --ultimate");
|
ui.writeInformation(" sudo safe-chain ultimate");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ export async function uninstallOnMacOS() {
|
||||||
if (!isRunningAsRoot()) {
|
if (!isRunningAsRoot()) {
|
||||||
ui.writeError("Root privileges required.");
|
ui.writeError("Root privileges required.");
|
||||||
ui.writeInformation("Please run this command with sudo:");
|
ui.writeInformation("Please run this command with sudo:");
|
||||||
ui.writeInformation(" sudo safe-chain --uninstall-ultimate");
|
ui.writeInformation(" sudo safe-chain ultimate uninstall");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue