summaryrefslogtreecommitdiff
path: root/lib/chef/knife/show.rb
diff options
context:
space:
mode:
authorjkeiser <jkeiser@opscode.com>2013-01-15 23:24:06 -0800
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:19 -0700
commitcaad7fbc4a0b18fd5a8304f4c087256b3c3674f7 (patch)
tree637114361140a6fd8717ff4d7e621ab1da1400bb /lib/chef/knife/show.rb
parentc3e6d026a5c80f16f61bd4c21993a7185640f707 (diff)
downloadchef-caad7fbc4a0b18fd5a8304f4c087256b3c3674f7.tar.gz
Move error printing from NotFoundError to caller
Diffstat (limited to 'lib/chef/knife/show.rb')
-rw-r--r--lib/chef/knife/show.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/knife/show.rb b/lib/chef/knife/show.rb
index e0dd17974d..9425da845e 100644
--- a/lib/chef/knife/show.rb
+++ b/lib/chef/knife/show.rb
@@ -24,8 +24,8 @@ class Chef
value = result.read
output "#{result.path_for_printing}:"
output(format_for_display(value))
- rescue Chef::ChefFS::FileSystem::NotFoundError
- ui.error "#{result.path_for_printing}: No such file or directory"
+ rescue Chef::ChefFS::FileSystem::NotFoundError => e
+ ui.error "#{e.entry.path_for_printing}: No such file or directory"
end
end
end