mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-01 12:59:15 -06:00
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 } {
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user