summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/file_system.rb
diff options
context:
space:
mode:
authorjkeiser <jkeiser@opscode.com>2013-01-20 14:33:14 -0800
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:25 -0700
commit60cdaa1ec495f156b8424e094cc28bbc73c5768a (patch)
treeea2598e1f871424ad15d05032acad8b67f7e5812 /lib/chef/chef_fs/file_system.rb
parent79557d0b72fd0cc91015de2a0ad016c09759084b (diff)
downloadchef-60cdaa1ec495f156b8424e094cc28bbc73c5768a.tar.gz
Print error for bad json in knife upload
Diffstat (limited to 'lib/chef/chef_fs/file_system.rb')
-rw-r--r--lib/chef/chef_fs/file_system.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/chef_fs/file_system.rb b/lib/chef/chef_fs/file_system.rb
index 8f7bd38168..8ab9a7ceda 100644
--- a/lib/chef/chef_fs/file_system.rb
+++ b/lib/chef/chef_fs/file_system.rb
@@ -18,6 +18,7 @@
require 'chef/chef_fs/path_utils'
require 'chef/chef_fs/file_system/default_environment_cannot_be_modified_error'
+require 'chef/chef_fs/file_system/operation_failed_error'
require 'chef/chef_fs/file_system/operation_not_allowed_error'
class Chef
@@ -351,6 +352,9 @@ class Chef
end
rescue DefaultEnvironmentCannotBeModifiedError => e
ui.warn "#{format_path.call(e.entry)} #{e.reason}."
+ rescue OperationFailedError => e
+ ui.error "#{format_path.call(e.entry)} failed to #{e.operation}: #{e.message}"
+ error = true
rescue OperationNotAllowedError => e
ui.error "#{format_path.call(e.entry)} #{e.reason}."
error = true