From 9e74d32f5f1d634cbf996f3c8d96883b898fa20f Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 23 Jul 2019 13:11:30 -0400 Subject: [PATCH] feat(@embark/cmd): add a warning on build and upload if development --- packages/embark/src/cmd/cmd.js | 1 - packages/embark/src/cmd/cmd_controller.js | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/embark/src/cmd/cmd.js b/packages/embark/src/cmd/cmd.js index d5f7423d2..f9b253082 100644 --- a/packages/embark/src/cmd/cmd.js +++ b/packages/embark/src/cmd/cmd.js @@ -2,7 +2,6 @@ import { __, setOrDetectLocale } from 'embark-i18n'; import { diagramPath } from 'embark-utils'; const program = require('commander'); const EmbarkController = require('./cmd_controller.js'); -const fs = require('../lib/core/fs.js'); let embark = new EmbarkController(); diff --git a/packages/embark/src/cmd/cmd_controller.js b/packages/embark/src/cmd/cmd_controller.js index 0b889cde1..47f41457d 100644 --- a/packages/embark/src/cmd/cmd_controller.js +++ b/packages/embark/src/cmd/cmd_controller.js @@ -222,6 +222,9 @@ class EmbarkController { engine.init({}, callback); }, function startServices(callback) { + if (options.env === 'development') { + engine.logger.warn(__('Building using the development environment. Did you forget to add an environment? eg: `embark build testnet`')); + } let pluginList = engine.plugins.listPlugins(); if (pluginList.length > 0) { engine.logger.info(__("loaded plugins") + ": " + pluginList.join(", ")); @@ -562,6 +565,9 @@ class EmbarkController { process.exit(1); } platform = engine.config.storageConfig.upload.provider; + if (options.env === 'development') { + engine.logger.warn(__('Uploading using the development environment. Did you forget to add an environment? eg: `embark upload testnet`')); + } callback(); }); },