- Notifications
You must be signed in to change notification settings - Fork680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
CHEF-14268-Update inspec init template with gem dependency#7311
base:inspec-7
Are you sure you want to change the base?
Conversation
Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
This reverts commite318d79.
Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
@@ -24,14 +24,24 @@ def valid_profile_platforms | |||
desc: "Which platform to generate a profile for: choose from #{valid_profile_platforms.join(", ")}" | |||
option :overwrite, type: :boolean, default: false, | |||
desc: "Overwrites existing directory" | |||
option :resource_dependency, default: nil, type: :string, aliases: [:r], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Are we supporting passing multiple resource pack dependencies in this? If not then simplyaliases: :r
should be used here.
# Check if "--resource-dependency" exists but has no argument | ||
if resource_index && (resource_index + 1 == ARGV.size || ARGV[resource_index + 1].start_with?("--")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Instead of using ARGV, can you instead try taking the approach of usingoptions[:resource_dependency]
fornil
handling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Also check, that even though this new key has a default value ofnil
it seems to be returning"resource_dependency"=>"resource_dependency"
in thor options when nothing is passed in resource dependency. Please have a check on this behaviour.
Update
inspec init profile
with new gem-based resource dependency templateDescription
inspec init profile --resource-dependency / inspec init profile -r will generate a profile template depending on the inspec gem-based resource
Related Issue
Types of changes
Checklist: