Changed red x to info symbol when mods are already at the latest version

This commit is contained in:
Kallum Jones 2022-08-07 21:14:12 +01:00
parent ca0c596423
commit f7758680d1
No known key found for this signature in database
GPG Key ID: D7F4589C4D7F81A9
4 changed files with 12 additions and 4 deletions

View File

@ -3,7 +3,7 @@ import {Command} from "commander";
import ModManager from "../mod-manager.js";
import Mods from "../mods/mods.js";
export default class UpgradeCommand implements Subcommand {
export default class UpdateCommand implements Subcommand {
registerCommand(program: Command): void {
program.command("update")
.description("Checks for and updates mods that have a newer available version")

View File

@ -11,7 +11,7 @@ import {ListCommand} from "./commands/list_command.js";
import UninstallCommand from "./commands/uninstall_command.js";
import EssentialCommand from "./commands/essential_command.js";
import {readFileSync, unlinkSync} from "fs";
import UpgradeCommand from "./commands/upgrade_command.js";
import UpdateCommand from "./commands/upgrade_command.js";
import MigratePossibleCommand from "./commands/migrate_possible.js";
@ -26,7 +26,7 @@ export default class ModManager {
new ListCommand(),
new UninstallCommand(),
new EssentialCommand(),
new UpgradeCommand(),
new UpdateCommand(),
new MigratePossibleCommand()
];

View File

@ -194,7 +194,7 @@ export default class Mods {
throw new ModNotFoundError("There is no newer version available.");
}
} catch (e) {
spinner.error(`${mod.name} already has the latest version installed!`)
spinner.info(`${mod.name} already has the latest version installed!`)
}
}
}

View File

@ -39,6 +39,14 @@ export default class PrintUtils {
this.spinner.succeed(print);
}
public warn(print: string) {
this.spinner.warn(print);
}
public info(print: string) {
this.spinner.info(` ${print}`);
}
public updateText(text: string) {
this.spinner.start(text);
}