Added uninstall command

This commit is contained in:
Kallum Jones
2022-08-04 14:24:39 +01:00
parent 129d7e7ad5
commit ab83374735
4 changed files with 69 additions and 10 deletions

View 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);
}
})
})
}
}