Skip to content

Commit

Permalink
Merge pull request Homebrew#10384 from MikeMcQuaid/exceptions-termsig
Browse files Browse the repository at this point in the history
exceptions: more handling of nil status.
  • Loading branch information
MikeMcQuaid authored Jan 21, 2021
2 parents 91759ac + 51b149b commit c7e9fdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def initialize(cmd, status:, output: nil, secrets: [])

reason = if exitstatus
"exited with #{exitstatus}"
elsif (uncaught_signal = status.termsig)
elsif (uncaught_signal = status&.termsig)
"was terminated by uncaught signal #{Signal.signame(uncaught_signal)}"
else
raise ArgumentError, "Status neither has `exitstatus` nor `termsig`."
Expand Down

0 comments on commit c7e9fdc

Please sign in to comment.