mirror of
https://git.bits.team/Bits/mod-manager.git
synced 2025-07-11 21:49:43 -04:00
Added uninstall command
This commit is contained in:
20
src/commands/uninstall_command.ts
Normal file
20
src/commands/uninstall_command.ts
Normal file
@ -0,0 +1,20 @@
|
||||
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...>")
|
||||
.action((mods) => {
|
||||
ModManager.execute(() => {
|
||||
for (let mod of mods) {
|
||||
Mods.uninstall(mod);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user