mirror of
https://git.bits.team/Bits/mod-manager.git
synced 2025-04-18 05:47:02 -04:00
20 lines
670 B
TypeScript
20 lines
670 B
TypeScript
import Subcommand from "./subcommand.js";
|
|
import {Command} from "commander";
|
|
import ModManager from "../mod-manager.js";
|
|
import Mods from "../mods/mods.js";
|
|
|
|
export default class UninstallCommand implements Subcommand {
|
|
registerCommand(program: Command): void {
|
|
program.command("uninstall")
|
|
.description("Uninstalls the provided mods")
|
|
.argument("<mods...>", "The mods to uninstall (as names or ids)")
|
|
.action((mods) => {
|
|
ModManager.execute(() => {
|
|
for (let mod of mods) {
|
|
Mods.uninstall(mod);
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
} |