summaryrefslogtreecommitdiff
path: root/lib/chef/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/application.rb')
-rw-r--r--lib/chef/application.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb
index e917a4eaf7..ab19e6571e 100644
--- a/lib/chef/application.rb
+++ b/lib/chef/application.rb
@@ -120,9 +120,10 @@ class Chef
end
def set_specific_recipes
- Chef::Config[:specific_recipes] =
- cli_arguments.map { |file| File.expand_path(file) } if
- cli_arguments.respond_to?(:map)
+ if cli_arguments.respond_to?(:map)
+ Chef::Config[:specific_recipes] =
+ cli_arguments.map { |file| File.expand_path(file) }
+ end
end
# Initialize and configure the logger.
@@ -342,7 +343,7 @@ class Chef
message = "#{e.class}: #{e}\n#{e.backtrace.join("\n")}"
cause = e.cause if e.respond_to?(:cause)
- while cause != nil
+ until cause.nil?
message << "\n\n>>>> Caused by #{cause.class}: #{cause}\n#{cause.backtrace.join("\n")}"
cause = cause.respond_to?(:cause) ? cause.cause : nil
end