Check for token variable instead of from options

Update the get method to only retrieve tokens if one doesn't exist from
either the cli arguments or from a dotfile
This commit is contained in:
Brian Cain 2015-09-15 15:22:13 -07:00
parent d557541174
commit 7015fc3b20
2 changed files with 3 additions and 3 deletions

View file

@ -10,7 +10,7 @@ class Vmfloaty
include Commander::Methods
def run
program :version, '0.2.0'
program :version, '0.2.1'
program :description, 'A CLI helper tool for Puppet Labs vmpooler to help you stay afloat'
config = read_config
@ -40,7 +40,7 @@ class Vmfloaty
return
end
unless options.token
unless token
pass = password "Enter your password please:", '*'
token = Auth.get_token(verbose, url, user, pass)
end