Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "myges", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -10,3 +10,3 @@ #!/usr/bin/env node --no-warnings | ||
const program = new commander.Command() | ||
program.version('1.0.0') | ||
program.version('1.0.4') | ||
@@ -218,2 +218,6 @@ program | ||
program.parse(process.argv) | ||
if (process.argv.length < 3) { | ||
program.help() | ||
} else { | ||
program.parse(process.argv) | ||
} |
@@ -49,2 +49,7 @@ const fs = require('fs').promises | ||
function must_be_logged() { | ||
console.error('You must be logged before using that command. (myges login)') | ||
return process.exit(1) | ||
} | ||
/** | ||
@@ -58,5 +63,4 @@ * @returns {Promise<Config>} | ||
if (exit_if_not_logged || !parsed.access_token || !parsed.token_type) { | ||
console.error('You must be logged before using that command. (ges login)') | ||
return process.exit(1) | ||
if (exit_if_not_logged && (!parsed.access_token || !parsed.token_type)) { | ||
return must_be_logged() | ||
} | ||
@@ -69,2 +73,6 @@ | ||
} catch (_) { | ||
if (exit_if_not_logged) { | ||
return must_be_logged() | ||
} | ||
return model | ||
@@ -71,0 +79,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43771
401