Add uninstallation process for ultimate

This commit is contained in:
Sander Declerck 2026-01-27 11:29:19 +01:00
parent dcebe734df
commit 53b7d9295c
No known key found for this signature in database
4 changed files with 167 additions and 12 deletions

View file

@ -16,7 +16,10 @@ import path from "path";
import { fileURLToPath } from "url";
import fs from "fs";
import { knownAikidoTools } from "../src/shell-integration/helpers.js";
import { installUltimate } from "../src/installation/installUltimate.js";
import {
installUltimate,
uninstallUltimate,
} from "../src/installation/installUltimate.js";
/** @type {string} */
// This checks the current file's dirname in a way that's compatible with:
@ -67,6 +70,10 @@ if (tool) {
(async () => {
await installUltimate();
})();
} else if (command === "--uninstall-ultimate") {
(async () => {
await uninstallUltimate();
})();
} else if (command === "teardown") {
teardownDirectories();
teardown();
@ -108,6 +115,11 @@ function writeHelp() {
"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(
`- ${chalk.cyan(
"safe-chain teardown",