From 51a63c05c18ecfb31f70de103bf1a8bb1a2ffd83 Mon Sep 17 00:00:00 2001 From: Muffin Date: Sat, 11 Nov 2023 23:22:34 -0600 Subject: [PATCH] Make cloud variable errors non-critical --- src/packager/packager.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/packager/packager.js b/src/packager/packager.js index c2bfef90..61dc9104 100644 --- a/src/packager/packager.js +++ b/src/packager/packager.js @@ -1301,14 +1301,18 @@ cd "$(dirname "$0")" scaffolding.setUsername(${JSON.stringify(this.options.username)}.replace(/#/g, () => Math.floor(Math.random() * 10))); scaffolding.setAccentColor(${JSON.stringify(this.options.appearance.accent)}); - ${this.options.cloudVariables.mode === 'ws' ? - `scaffolding.addCloudProvider(${this.makeWebSocketProvider()})` : - this.options.cloudVariables.mode === 'local' ? - `scaffolding.addCloudProvider(${this.makeLocalStorageProvider()})` : - this.options.cloudVariables.mode === 'custom' ? - this.makeCustomProvider() : - '' - }; + try { + ${this.options.cloudVariables.mode === 'ws' ? + `scaffolding.addCloudProvider(${this.makeWebSocketProvider()})` : + this.options.cloudVariables.mode === 'local' ? + `scaffolding.addCloudProvider(${this.makeLocalStorageProvider()})` : + this.options.cloudVariables.mode === 'custom' ? + this.makeCustomProvider() : + '' + }; + } catch (error) { + console.error(error); + } ${this.options.controls.greenFlag.enabled ? ` const greenFlagButton = document.createElement('img');