Browse Source

Don't prompt for login if token was defined (#797)

* fix(prompt): unexpected Prompt for login when given token [#795]

* update

* update
master
Michael Hsu 8 years ago
committed by Leo Lamprecht
parent
commit
77e95e28b9
  1. 6
      src/now.js

6
src/now.js

@ -364,7 +364,11 @@ const main = async (argv_) => {
// If no credentials are set at all, prompt for
// login to the .sh provider
if (!authConfig.credentials.length && !ctx.argv.includes('-h')) {
if (
!authConfig.credentials.length &&
!ctx.argv.includes('-h') && !ctx.argv.includes('--help') &&
!ctx.argv.includes('-t') && !ctx.argv.includes('--token')
) {
console.log(info(`No existing credentials found. Please log in:`))
subcommand = 'login'

Loading…
Cancel
Save