Update commands for ultimate

This commit is contained in:
Sander Declerck 2026-01-27 13:06:17 +01:00
parent c3282e372b
commit 364061b186
No known key found for this signature in database
2 changed files with 27 additions and 21 deletions

View file

@ -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") {
})();
} else if (command === "--uninstall-ultimate") {
(async () => { (async () => {
await uninstallUltimate(); 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() {

View file

@ -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;
} }