mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
Do not ask for password if token is provided
This commit is contained in:
parent
562b811867
commit
9e4e7b3dab
1 changed files with 2 additions and 2 deletions
|
|
@ -27,13 +27,13 @@ class Vmfloaty
|
||||||
c.option '--os STRING', String, 'Operating systems to retrieve'
|
c.option '--os STRING', String, 'Operating systems to retrieve'
|
||||||
c.action do |args, options|
|
c.action do |args, options|
|
||||||
verbose = options.verbose || config['verbose']
|
verbose = options.verbose || config['verbose']
|
||||||
token = options.token
|
token = options.token || config['token']
|
||||||
user = options.user ||= config['user']
|
user = options.user ||= config['user']
|
||||||
url = options.url ||= config['url']
|
url = options.url ||= config['url']
|
||||||
os_types = options.os
|
os_types = options.os
|
||||||
pass = password "Enter your password please:", '*'
|
|
||||||
|
|
||||||
unless options.token
|
unless options.token
|
||||||
|
pass = password "Enter your password please:", '*'
|
||||||
token = Auth.get_token(verbose, url, user, pass)
|
token = Auth.get_token(verbose, url, user, pass)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue