Skip to content

Commit

Permalink
Fixed nilreference failure in method 'handle_deployment_failure'. (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
borsothy authored and askreet committed Feb 7, 2017
1 parent c530574 commit 9b440a1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/moonshot/deployment_mechanism/code_deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,13 @@ def handle_deployment_failure(deployment_id)
inst_summary.lifecycle_events.each do |event|
next unless event.status == 'Failed'

ilog.error(event.diagnostics.message)
event.diagnostics.log_tail.each_line do |line|
ilog.error(line)
if event.diagnostics.nil?
ilog.error('Lifecycle event chain is not available.')
else
ilog.error(event.diagnostics.message)
event.diagnostics.log_tail.each_line do |line|
ilog.error(line)
end
end
end
end
Expand Down

0 comments on commit 9b440a1

Please sign in to comment.