summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNolan Davidson <nolan.davidson@gmail.com>2014-09-10 16:38:59 -0400
committerLamont Granquist <lamont@scriptkiddie.org>2014-09-10 14:59:09 -0700
commita4ff319fc0e1b7408ff926caa10d3c72c1d968d2 (patch)
treefa591198049a16e32c84e39fef25b638cb5bad4b
parentdad4783c04367bebfa5ecb295c59f8cb97d5e3bb (diff)
downloadchef-a4ff319fc0e1b7408ff926caa10d3c72c1d968d2.tar.gz
inverted if and removed else
-rw-r--r--lib/chef/application/apply.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb
index 95c937905b..ea9154c6f2 100644
--- a/lib/chef/application/apply.rb
+++ b/lib/chef/application/apply.rb
@@ -134,13 +134,12 @@ class Chef::Application::Apply < Chef::Application
@recipe_text = STDIN.read
temp_recipe_file
else
- if ARGV[0]
- @recipe_filename = ARGV[0]
- @recipe_text,@recipe_fh = read_recipe_file @recipe_filename
- else
+ if !ARGV[0]
puts opt_parser
Chef::Application.exit! "No recipe file provided", 1
end
+ @recipe_filename = ARGV[0]
+ @recipe_text,@recipe_fh = read_recipe_file @recipe_filename
end
recipe,run_context = get_recipe_and_run_context
recipe.instance_eval(@recipe_text, @recipe_filename, 1)