-
Notifications
You must be signed in to change notification settings - Fork 681
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --cache
option to inspec exec
#1113
Conversation
We still have a lot of inconsistency around whether we want to call it the |
@stevendanna I like the wording |
@@ -1,5 +1,4 @@ | |||
# encoding: utf-8 | |||
require 'inspec/dependencies/vendor_index' |
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.
should we rename vendor_index to cache then?
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.
Good call. I think I've completed the rename in my latest commit.
@@ -58,6 +58,8 @@ def self.exec_options | |||
desc: 'Use colors in output.' | |||
option :attrs, type: :array, | |||
desc: 'Load attributes file (experimental)' | |||
option :cache, type: :string, default: File.expand_path('~/.inspec/cache'), |
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.
Per discussion, let's nuke this default, the Cache class already has one.
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.
+1
This allows users to run: inspec exec ./ --cache PATH which will use `PATH` as the dir to retrieve and store remote dependencies. The hope is that this can eventually be used with `inspec vendor PATH` to package up a profile for offline use. Signed-off-by: Steven Danna <[email protected]>
3cba041
to
2d28c78
Compare
This allows users to run:
inspec exec ./ --cache PATH
which will use
PATH
as the dir to retrieve and store remotedependencies. The hope is that this can eventually be used with
inspec vendor PATH
to package up a profile for offline use.Signed-off-by: Steven Danna [email protected]