-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
1 addition
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ def execute_command(executable, command, raise_on_failure = false) | |
# @return [void] | ||
# | ||
def check_exit_code!(executable, command, output) | ||
if $CHILD_STATUS.to_i != 0 | ||
if $?.to_i != 0 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
fabiopelosin
Author
Member
|
||
raise DownloaderError, "Error on `#{executable} #{command}`.\n#{output}" | ||
end | ||
end | ||
|
Not sure if you knew this one, but
$?
is aProcess::Status
object and has aexitstatus
method: http://apidock.com/ruby/Process/Status/exitstatus.I have no further opinion on which is better, though ;)