mirror of https://github.com/embarklabs/embark.git
feat(@embark/cli): exit with error if --template and --contracts-only are both used with 'new' cmd
This commit is contained in:
parent
e5fc12e256
commit
d477adc87e
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue