Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open.popen3 does not set $? #5520

Merged

Conversation

rolandwalker
Copy link
Contributor

This is possibly the cause of other glitches such as random
failures on Travis.

Ruby 1.8 popen3 does set global $? for the exit status, Ruby
1.9 and above does not. For Ruby 2.0 users (Mavericks and
above with recent Homebrew), success or failure of the current
external command was determined by the exit status of some
previous command.

For newer Rubies, we should use the fourth parameter from popen3
to get the exit status.

Closes Homebrew/homebrew-cask-fonts#186

Edit: rewrote this comment to match the amended commit message

@rolandwalker
Copy link
Contributor Author

The above is not entirely true.
Ruby docs differ on popen3 for 1.8.7 vs 1.9 and above:

Further work is needed.

This is possibly the cause of other glitches such as random
failures on Travis.

Ruby 1.8 popen3 does set global $? for the exit status, Ruby
1.9 and above does not.  For Ruby 2.0 users (Mavericks and
above with recent Homebrew), success or failure of the current
external command was determined by the exit status of some
previous command.

Closes Homebrew/homebrew-cask-fonts#186
rolandwalker added a commit that referenced this pull request Jul 28, 2014
@rolandwalker rolandwalker merged commit 583890a into Homebrew:master Jul 28, 2014
@rolandwalker rolandwalker deleted the system_command_exit_status branch July 28, 2014 18:16
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All fonts based on w0nk google font mirror repo fail on the first try
1 participant