1
1
mirror of https://git.bits.team/Bits/mod-manager.git synced 2025-04-09 17:38:36 -04:00

Compare commits

..

No commits in common. "9afa90963a7fe2c8d2a31081c249aa8aa5ee1a1e" and "518398d626d8e2a6b65cc8ba408eaf2452b22b2a" have entirely different histories.

2 changed files with 6 additions and 6 deletions

@ -64,7 +64,7 @@ export default class ModManager {
Mods.registerSource(new ModrinthSource())
Mods.registerSource(new CurseforgeSource(), "CURSEFORGE_API_KEY")
Mods.registerSource(new ForgejoSource(), "FORGEJO_API_KEY", true)
Mods.registerSource(new ForgejoSource(), "FORGEJO_API_KEY")
this.program.showSuggestionAfterError();
this.program.showHelpAfterError();

@ -13,12 +13,12 @@ import chalk from "chalk";
export default class Mods {
private static readonly MOD_SOURCES: Array<ModSource> = [];
public static registerSource(source: ModSource, envVar?: string, suppressWarning?: boolean) {
if (envVar && !process.env.hasOwnProperty(envVar)) {
if (!suppressWarning)
public static registerSource(source: ModSource, envVar?: string) {
if (envVar != undefined) {
if (!process.env.hasOwnProperty(envVar)) {
PrintUtils.warn(`${source.getSourceName()} could not be registered as a mod source, as the required environment variable ${envVar} was not detected. Functionality related to ${source.getSourceName()} will be skipped.`)
return;
return;
}
}
this.MOD_SOURCES.push(source);
}