Fix username/password CLI options

This commit is contained in:
Chocobozzz 2022-03-15 09:21:05 +01:00
parent 57d6503286
commit 74220dba9d
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -73,10 +73,10 @@ function getRemoteObjectOrDie (
): { url: string, username: string, password: string } {
const options = program.opts()
function exitIfNoOptions (options: string[], errorPrefix: string = '') {
function exitIfNoOptions (optionNames: string[], errorPrefix: string = '') {
let exit = false
for (const key of options) {
for (const key of optionNames) {
if (!options[key]) {
if (exit === false && errorPrefix) console.error(errorPrefix)