Fix username/password CLI options
This commit is contained in:
parent
57d6503286
commit
74220dba9d
|
@ -73,10 +73,10 @@ function getRemoteObjectOrDie (
|
||||||
): { url: string, username: string, password: string } {
|
): { url: string, username: string, password: string } {
|
||||||
const options = program.opts()
|
const options = program.opts()
|
||||||
|
|
||||||
function exitIfNoOptions (options: string[], errorPrefix: string = '') {
|
function exitIfNoOptions (optionNames: string[], errorPrefix: string = '') {
|
||||||
let exit = false
|
let exit = false
|
||||||
|
|
||||||
for (const key of options) {
|
for (const key of optionNames) {
|
||||||
if (!options[key]) {
|
if (!options[key]) {
|
||||||
if (exit === false && errorPrefix) console.error(errorPrefix)
|
if (exit === false && errorPrefix) console.error(errorPrefix)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue