diff options
author | David Workman <me@workmad3.com> | 2014-09-03 15:36:01 +0100 |
---|---|---|
committer | David Workman <me@workmad3.com> | 2014-09-03 15:36:01 +0100 |
commit | f1de2a538ba8b89bdcb24de168db0b99cb0cc8fb (patch) | |
tree | 3266c28dce52fe3ffab1152deeeca9f6213194fd /lib | |
parent | b6f92cf2eac4a8056d8594a94aa026b69e348386 (diff) | |
download | chef-f1de2a538ba8b89bdcb24de168db0b99cb0cc8fb.tar.gz |
Update apply.rb
File.exist? throws an exception if file_name is nil instead of "".
Use .to_s to normalise file_name to a string rather than have an explicit nil check.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/application/apply.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb index ab35b35389..f2dd2cb586 100644 --- a/lib/chef/application/apply.rb +++ b/lib/chef/application/apply.rb @@ -92,7 +92,7 @@ class Chef::Application::Apply < Chef::Application end def read_recipe_file(file_name) - recipe_path = file_name + recipe_path = file_name.to_s unless File.exist?(recipe_path) Chef::Application.fatal!("No file exists at #{recipe_path}", 1) end |