diff options
author | John Keiser <jkeiser@opscode.com> | 2013-06-19 00:24:41 -0600 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-09-12 23:10:54 -0700 |
commit | 9a7449687cc25d42bfa1881584dc10675068e036 (patch) | |
tree | 35ec910e078f2430c2362fb100b50e8cef12997b /lib/chef/knife | |
parent | 52ecc414cdb284182f08bbfbd3b8e46ba1c03958 (diff) | |
download | chef-9a7449687cc25d42bfa1881584dc10675068e036.tar.gz |
Add --cookbook-version to knife download and knife diff
Diffstat (limited to 'lib/chef/knife')
-rw-r--r-- | lib/chef/knife/diff.rb | 4 | ||||
-rw-r--r-- | lib/chef/knife/download.rb | 4 |
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 |