This commit is contained in:
Reinier Criel 2025-12-11 15:13:15 -08:00
parent 14bb6899d8
commit 2b0f8d9f0d
6 changed files with 76 additions and 4 deletions

View file

@ -1,7 +1,8 @@
import chalk from "chalk";
import { ui } from "../environment/userInteraction.js";
import { detectShells } from "./shellDetection.js";
import { knownAikidoTools, getPackageManagerList } from "./helpers.js";
import { knownAikidoTools, getPackageManagerList, getShimsDir, } from "./helpers.js";
import fs from "fs";
/**
* @returns {Promise<void>}
@ -62,3 +63,24 @@ export async function teardown() {
return;
}
}
/**
* @returns {Promise<void>}
*/
export async function teardownCi() {
const shimsDir = getShimsDir();
if (fs.existsSync(shimsDir)) {
try {
fs.rmSync(shimsDir, { recursive: true, force: true });
ui.writeInformation(
`${chalk.bold("- CI Shims:")} ${chalk.green("Removed successfully")}`
);
} catch (/** @type {any} */ error) {
ui.writeError(
`${chalk.bold("- CI Shims:")} ${chalk.red(
"Failed to remove"
)}. Error: ${error.message}`
);
}
}
}