end with error if an action is not found

This commit is contained in:
2017-08-28 13:25:22 +02:00
parent 8890caca3d
commit abe2408773
8 changed files with 25 additions and 4 deletions

View File

@@ -12,9 +12,11 @@ export let handleCli = async (argvArg) => {
switch (action) {
default:
plugins.beautylog.error(`>>npmci cloudflare ...<< action >>${action}<< not supported`)
process.exit(1)
}
} else {
plugins.beautylog.log(`>>npmci cloudflare ...<< cli arguments invalid... Please read the documentation.`)
process.exit(1)
}
}

View File

@@ -20,9 +20,11 @@ export let handleCli = async (argvArg) => {
break
default:
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`)
process.exit(1)
}
} else {
plugins.beautylog.error(`>>npmci node ...<< cli arguments invalid... Please read the documentation.`)
process.exit(1)
}
}

View File

@@ -29,9 +29,11 @@ export let handleCli = async (argvArg) => {
break
default:
plugins.beautylog.error(`>>npmci npm ...<< action >>${action}<< not supported`)
process.exit(1)
}
} else {
plugins.beautylog.log(`>>npmci npm ...<< cli arguments invalid... Please read the documentation.`)
process.exit(1)
}
}

View File

@@ -10,7 +10,11 @@ export let handleCli = async (argvArg) => {
break
default:
plugins.beautylog.error(`action >>${action}<< not supported`)
process.exit(1)
}
} else {
plugins.beautylog.error(`>>npmci ssh ...<< please specify an action!`)
process.exit(1)
}
}