feat(@embark/cmd): add a warning on build and upload if development

This commit is contained in:
Jonathan Rainville 2019-07-23 13:11:30 -04:00
parent 1491028665
commit 9e74d32f5f
2 changed files with 6 additions and 1 deletions

View File

@ -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();

View File

@ -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();
});
},