mirror of
https://git.bits.team/Bits/mod-manager.git
synced 2024-11-21 21:48:21 -05:00
Check mods are installed when listing them
This commit is contained in:
parent
5f13645122
commit
1af3292e8c
@ -13,12 +13,20 @@ export class ListCommand implements Subcommand {
|
|||||||
.description("Lists installed mods")
|
.description("Lists installed mods")
|
||||||
.action(() => {
|
.action(() => {
|
||||||
ModManager.execute(() => {
|
ModManager.execute(() => {
|
||||||
let tableFunc = asTable.configure ({
|
const tableFunc = asTable.configure ({
|
||||||
title: x => chalk.cyanBright(Util.stringPrettyify(x)),
|
title: x => chalk.cyanBright(Util.stringPrettyify(x)),
|
||||||
delimiter: chalk.blueBright(' | '),
|
delimiter: chalk.blueBright(' | '),
|
||||||
dash: chalk.blueBright('-')
|
dash: chalk.blueBright('-')
|
||||||
})
|
})
|
||||||
PrintUtils.info(tableFunc(Mods.getTrackedMods()))
|
|
||||||
|
const mods = Mods.getTrackedMods();
|
||||||
|
|
||||||
|
if (!Util.isArrayEmpty(mods)) {
|
||||||
|
PrintUtils.info(tableFunc(Mods.getTrackedMods()))
|
||||||
|
} else {
|
||||||
|
PrintUtils.warn("There are no mods installed yet! Try mod-manager install -h to figure out more!")
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user