Skip to content

Commit

Permalink
[Added] Show verbose errors from prepare commands [#161462746]
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Lattanzio <slattanzio@pivotal.io>
  • Loading branch information
Vikram Yadav authored and xtreme-shane-lattanzio committed Nov 9, 2018
1 parent bf2829b commit 2b14299
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/license_finder/package_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def prepare
_stdout, stderr, status = Dir.chdir(project_path) { Cmd.run(self.class.prepare_command) }
unless status.success?
log_errors stderr
raise "Prepare command '#{self.class.prepare_command}' failed" unless @prepare_no_fail

error_message = "Prepare command '#{self.class.prepare_command}' failed\n#{stderr}"

raise error_message unless @prepare_no_fail
end
else
logger.debug self.class, 'no prepare step provided', color: :red
Expand Down

0 comments on commit 2b14299

Please sign in to comment.