diff --git a/backend/lib/updater/Updater.js b/backend/lib/updater/Updater.js index d53fe6c..038d541 100644 --- a/backend/lib/updater/Updater.js +++ b/backend/lib/updater/Updater.js @@ -2,6 +2,7 @@ const fs = require("fs"); const GithubNoCloudNightlyUpdateProvider = require("./lib/update_provider/GithubNoCloudNightlyUpdateProvider"); const GithubNoCloudUpdateProvider = require("./lib/update_provider/GithubNoCloudUpdateProvider"); const Logger = require("../Logger"); +const NullUpdateProvider = require("./lib/update_provider/NullUpdateProvider"); const States = require("../entities/core/updater"); const Steps = require("./lib/steps"); @@ -50,7 +51,8 @@ class Updater { this.updateProvider = new GithubNoCloudNightlyUpdateProvider(); break; default: - throw new Error(`Invalid UpdateProvider ${updaterConfig.updateProvider.type}`); + Logger.error(`Invalid UpdateProvider ${updaterConfig.updateProvider.type}`); + this.updateProvider = new NullUpdateProvider(); } if (updaterConfig.enabled === true) { diff --git a/backend/lib/updater/lib/update_provider/NullUpdateProvider.js b/backend/lib/updater/lib/update_provider/NullUpdateProvider.js new file mode 100644 index 0000000..020a5b3 --- /dev/null +++ b/backend/lib/updater/lib/update_provider/NullUpdateProvider.js @@ -0,0 +1,20 @@ +const NoCloudUpdateProvider = require("./NoCloudUpdateProvider"); + +class NullUpdateProvider extends NoCloudUpdateProvider { + /** + * @return {Promise>} + */ + async fetchReleases() { + return []; + } + + /** + * @param {import("./NoCloudRelease")} release + * @return {Promise>} + */ + async fetchBinariesForRelease(release) { + return []; + } +} + +module.exports = NullUpdateProvider;