mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
rename --key-file to --key on cli
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
parent
fa90e71689
commit
5825b4d6d4
2 changed files with 4 additions and 1 deletions
|
@ -55,7 +55,7 @@ class VulcanoCLI < Thor
|
|||
desc: 'The login user for a remote scan.'
|
||||
option :password, type: :string, default: nil,
|
||||
desc: 'Login password for a remote scan, if required.'
|
||||
option :key_file, type: :string, default: nil,
|
||||
option :key, type: :string, default: nil,
|
||||
desc: 'Login key or certificate file for a remote scan.'
|
||||
option :disable_sudo, type: :boolean, default: false,
|
||||
desc: 'To not run remote scans via sudo.'
|
||||
|
|
|
@ -15,6 +15,9 @@ module Vulcano
|
|||
def self.target_config(config = nil)
|
||||
conf = config.nil? ? {} : config.dup
|
||||
|
||||
key = conf['key']
|
||||
conf['key_file'] = key if !key.nil? and File.file?(key)
|
||||
|
||||
return conf if conf['target'].to_s.empty?
|
||||
|
||||
uri = URI.parse(conf['target'].to_s)
|
||||
|
|
Loading…
Reference in a new issue