summaryrefslogtreecommitdiff
path: root/lib/chef/knife
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife')
-rw-r--r--lib/chef/knife/diff.rb4
-rw-r--r--lib/chef/knife/download.rb4
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/knife/diff.rb b/lib/chef/knife/diff.rb
index 5a3a80544d..df7681c91a 100644
--- a/lib/chef/knife/diff.rb
+++ b/lib/chef/knife/diff.rb
@@ -30,6 +30,10 @@ class Chef
:description => "Select only files that are Added (A), Deleted (D), Modified (M), or have their type (i.e. regular file, directory) changed (T). Any combination of the filter characters (including none) can be used. When * (All-or-none) is added to the combination, all paths are selected if
there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected."
+ option :cookbook_version,
+ :long => '--cookbook-version VERSION',
+ :description => 'Version of cookbook to download (if there are multiple versions and cookbook_versions is false)'
+
def run
if config[:name_only]
output_mode = :name_only
diff --git a/lib/chef/knife/download.rb b/lib/chef/knife/download.rb
index e8f26a74aa..d8a0ed2eca 100644
--- a/lib/chef/knife/download.rb
+++ b/lib/chef/knife/download.rb
@@ -40,6 +40,10 @@ class Chef
:default => true,
:description => 'Turn off to avoid uploading existing files; only new (and possibly deleted) files with --no-diff'
+ option :cookbook_version,
+ :long => '--cookbook-version VERSION',
+ :description => 'Version of cookbook to download (if there are multiple versions and cookbook_versions is false)'
+
def run
if name_args.length == 0
show_usage