Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

All fonts based on w0nk google font mirror repo fail on the first try #186

Closed
aziz opened this issue Jul 26, 2014 · 1 comment · Fixed by Homebrew/homebrew-cask#5520
Closed

Comments

@aziz
Copy link
Contributor

aziz commented Jul 26, 2014

I'm having a strange issue here. All the google fonts that come from w0ng/googlefontdirectory fail on the first install with an error like below, but if I try to run the command again it works fine.

==> Checking out https://github.com/w0ng/googlefontdirectory/trunk/fonts/robotoslab
Error: Download failed on Cask 'font-roboto-slab' with message: Command failed to execute!

==> Failed command:
["/usr/bin/svn", "checkout", "--force", "--config-option", "config:miscellany:use-commit-times=yes", "--trust-server-cert", "--non-interactive", "https://github.com/w0ng/googlefontdirectory/trunk/fonts/robotoslab", "#<Pathname:/Library/Caches/Homebrew/font-roboto-slab--svn>", "-r", "50"]

==> Output of failed command:
A    /Library/Caches/Homebrew/font-roboto-slab--svn/COPYRIGHT.txt
A    /Library/Caches/Homebrew/font-roboto-slab--svn/LICENSE.txt
A    /Library/Caches/Homebrew/font-roboto-slab--svn/METADATA.json
A    /Library/Caches/Homebrew/font-roboto-slab--svn/RobotoSlab-Bold.ttf
A    /Library/Caches/Homebrew/font-roboto-slab--svn/RobotoSlab-Light.ttf
A    /Library/Caches/Homebrew/font-roboto-slab--svn/RobotoSlab-Regular.ttf
A    /Library/Caches/Homebrew/font-roboto-slab--svn/RobotoSlab-Thin.ttf
Checked out revision 50.


==> Exit status of failed command:
#<Process::Status: pid 3310 exit 1>
@rolandwalker
Copy link
Contributor

Thanks a bunch!

This is the same issue as #182, but the datapoint on running twice was helpful. It looks like all the way back in Homebrew/homebrew-cask#2624, when we switched to using Open3.popen3, we continued using the $? variable (which does not work).

So the exit status was reflecting some previous command rather than the current one. This probably explains several other weird bugs, such as random glitches with the test suite on Travis. I'll push a fix to the main repo shortly.

rolandwalker added a commit to rolandwalker/homebrew-cask that referenced this issue Jul 28, 2014
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
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 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 a pull request may close this issue.

2 participants