diff --git a/src/lib/modules/swarm/index.js b/src/lib/modules/swarm/index.js index df1f60f31..20da90a43 100644 --- a/src/lib/modules/swarm/index.js +++ b/src/lib/modules/swarm/index.js @@ -26,8 +26,15 @@ class Swarm { if(this.isSwarmEnabledInTheConfig() && cantDetermineUrl){ console.warn('\n===== Swarm module will not be loaded ====='); console.warn(`Swarm is enabled in the config, however the config is not setup to provide a URL for swarm and therefore the Swarm module will not be loaded. Please either change the ${'config/storage > upload'.bold} setting to Swarm or add the Swarm config to the ${'config/storage > dappConnection'.bold} array. Please see ${'https://embark.status.im/docs/storage_configuration.html'.underline} for more information.\n`); - } - if (!this.isSwarmEnabledInTheConfig() || cantDetermineUrl) { + } else { + this.embark.registerConsoleCommand({ + matches: cmd => cmd === "swarm" || cmd.indexOf('swarm ') === 0, + process: (_cmd, cb) => { + console.warn(__(`Swarm is disabled or not configured. Please see %s for more information.`, 'https://embark.status.im/docs/storage_configuration.html'.underline)); + cb(); + } + }); + return; }