summaryrefslogtreecommitdiff
path: root/lib/chef/knife/diff.rb
diff options
context:
space:
mode:
authorjkeiser <jkeiser@opscode.com>2013-03-14 11:12:33 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:29 -0700
commitf5d9ab6af3479fa0ce3053723ed8cc9cb689e0bf (patch)
tree4578a81d221c0cc4fffc7b204ed62a3dc6181c22 /lib/chef/knife/diff.rb
parentb02853ddd1dd97992c952eeef318b3f84af27563 (diff)
downloadchef-f5d9ab6af3479fa0ce3053723ed8cc9cb689e0bf.tar.gz
Allow diff to continue on error
Diffstat (limited to 'lib/chef/knife/diff.rb')
-rw-r--r--lib/chef/knife/diff.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/chef/knife/diff.rb b/lib/chef/knife/diff.rb
index 6e15c8de23..154a5940e9 100644
--- a/lib/chef/knife/diff.rb
+++ b/lib/chef/knife/diff.rb
@@ -42,13 +42,10 @@ class Chef
error = false
begin
patterns.each do |pattern|
- found_match = Chef::ChefFS::CommandLine.diff_print(pattern, chef_fs, local_fs, config[:recurse] ? nil : 1, output_mode, proc { |entry| format_path(entry) }, config[:diff_filter] ) do |diff|
+ found_error = Chef::ChefFS::CommandLine.diff_print(pattern, chef_fs, local_fs, config[:recurse] ? nil : 1, output_mode, proc { |entry| format_path(entry) }, config[:diff_filter], ui ) do |diff|
stdout.print diff
end
- if !found_match
- ui.error "#{pattern}: No such file or directory on remote or local"
- error = true
- end
+ error = true if found_error
end
rescue Chef::ChefFS::FileSystem::OperationFailedError => e
ui.error "Failed on #{format_path(e.entry)} in #{e.operation}: #{e.message}"