mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
9e3706aabe
Due to limitations in Thor it is not possible to set an argument to be both optional and its value to be mandatory. E.g. the user supplying the --password argument is optional and not always required, but whenever it is used, it requires a value. Handle options that were defined with mandatory values in a way that fails with an `ArgumentError` if the value is missing, i.e.: ``` > inspec exec examples/profile --password ArgumentError: Please provide a value for --password. For example: --password=hello. ``` It works without `--password` or with `--password=arg`. Also handled for `--sudo-password`. Fixes: https://github.com/chef/inspec/issues/1901 As suggested: https://github.com/chef/inspec/pull/1904 Signed-off-by: Dominik Richter <dominik.richter@gmail.com> |
||
---|---|---|
.. | ||
gitfetcher_test.rb | ||
helper.rb | ||
inheritance_test.rb | ||
inspec_archive_test.rb | ||
inspec_artifact_test.rb | ||
inspec_compliance_test.rb | ||
inspec_exec_json_test.rb | ||
inspec_exec_jsonmin_test.rb | ||
inspec_exec_junit_test.rb | ||
inspec_exec_test.rb | ||
inspec_json_profile_test.rb | ||
inspec_shell_test.rb | ||
inspec_test.rb | ||
inspec_vendor_test.rb |