From d477adc87e553a6944b9dfe74eeb0f5a64504cd9 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 26 May 2019 20:36:39 -0500 Subject: [PATCH] feat(@embark/cli): exit with error if --template and --contracts-only are both used with 'new' cmd --- packages/embark/src/cmd/cmd.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/embark/src/cmd/cmd.js b/packages/embark/src/cmd/cmd.js index 2709dd167..d5f7423d2 100644 --- a/packages/embark/src/cmd/cmd.js +++ b/packages/embark/src/cmd/cmd.js @@ -57,6 +57,11 @@ class Cmd { .action(function(name, options) { setOrDetectLocale(options.locale); + if (options.contractsOnly && options.template) { + console.error('invalid: --contracts-only and --template options cannot be used together'.red); + process.exit(1); + } + const contractsOnly = options.simple || options.contractsOnly; if (name === undefined) { @@ -80,6 +85,7 @@ class Cmd { } }); } + if (contractsOnly) { embark.generateTemplate('simple', './', name); } else {