Permalink
Browse files

Fix: error occurred because "file not found" before converge recipe[t…

…ools].
  • Loading branch information...
sawanoboly committed Feb 20, 2013
1 parent 2882e67 commit 908047ef6c3d5570a9910948da1f147b44f270c1
Showing with 4 additions and 2 deletions.
  1. +4 −2 recipes/add_joyent_attributes.rb
@@ -13,6 +13,8 @@
case node['platform']
when "smartos"
Chef::Log.info "update attributes from sm-summary"
- joyent_attrs = JSON.parse(`/opt/local/bin/sm-summary_json -j`)
- node.set['joyent'] = joyent_attrs
+ if ::File.exist?("/opt/local/bin/sm-summary_json") then
+ joyent_attrs = JSON.parse(`/opt/local/bin/sm-summary_json -j`)
+ node.set['joyent'] = joyent_attrs
+ end
end

0 comments on commit 908047e

Please sign in to comment.