-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Bug report: core: brew cask command prints "Kernel.exit" to stdout, breaking scripts #15882
Comments
Please always follow the reporting bugs guide. To do so, edit the top post and then comment after this one so I can check back. Closing in the meantime, because a number of people never report back and it’s useless to keep the issue open in that case and without all the required information. Also, be sure to run |
Sorry, updated. In my defense, it seems that the templates have been in place for less than a week, and I've filed reports before, so hopefully it's understandable that I didn't check the contribution guidelines again. I put the output of doctors in separate gists because I don't want to have a wall of not-so-relevant output in the issue description. Please let me know if you really want to have them inline.
Yes I've done that before reporting. In fact, I suspect that this issue is caused by the new behavior, although I haven't really tested. |
Thank you for updating your issue with the info.
For reference, I don't have such behavior and I'm using brew's ruby.
Also, can you check if the problem persists with a different shell? (ie. bash) |
I have rubies from system, brew, and rvm, but I don't think it matters, because
on Darwin (https://github.com/Homebrew/homebrew/blob/master/bin/brew#L29-L37), unless both
Weird. |
Okay, I even went ahead and set both > /usr/local/bin/ruby --version
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]
> export HOMEBREW_DEVELOPER=yes HOMEBREW_RUBY_PATH=/usr/local/bin/ruby
> HOMEBREW_VERBOSE= HOMEBREW_CASK_OPTS= brew cask info google-chrome 2>/dev/null
...
Kernel.exit |
If I may, I think it's connected to your use of > brew cask info google-chrome
google-chrome: latest
Google Chrome
https://www.google.com/chrome/
/opt/homebrew-cask/Caskroom/google-chrome/latest (368 files, 364M)
https://github.com/caskroom/homebrew-cask/blob/master/Casks/google-chrome.rb
==> Contents
Google Chrome.app (app)
==> Caveats
The Mac App Store version of 1Password won't work with a Homebrew-Cask-linked Google Chrome. To bypass this limitation, you need to either:
+ Move Google Chrome to your /Applications directory (the app itself, not a symlink).
+ Install 1Password from outside the Mac App Store (licenses should transfer automatically, but you should contact AgileBits about it). and > brew -v cask info google-chrome
google-chrome: latest
Google Chrome
https://www.google.com/chrome/
/opt/homebrew-cask/Caskroom/google-chrome/latest (368 files, 364M)
https://github.com/caskroom/homebrew-cask/blob/master/Casks/google-chrome.rb
==> Contents
Google Chrome.app (app)
==> Caveats
The Mac App Store version of 1Password won't work with a Homebrew-Cask-linked Google Chrome. To bypass this limitation, you need to either:
+ Move Google Chrome to your /Applications directory (the app itself, not a symlink).
+ Install 1Password from outside the Mac App Store (licenses should transfer automatically, but you should contact AgileBits about it).
Kernel.exit |
I just confirmed my suspicion that this was caused by the tap-only PR #15381. > cd /usr/local/Library/Taps/caskroom/homebrew-cask
> git checkout 5a961389ff098beea56aa3e511aa09540234ef5e # pre tap-only
> brew install brew-cask
> brew cask info google-chrome # no problem
...
> git checkout d31e7fcc8d60f44e8bb1c60507406e23e67d48bb # the merge commit
> brew uninstall --force brew-cask
> brew cask info google-chrome # BAM!
...
Kernel.exit |
@Amorymeltzer Huh that's right, apparently setting it to null is not enough, I have to fully unset it. > unset HOMEBREW_VERBOSE
> brew cask info google-chrome # there it is, no Kernel.exit this time
... Still, probably something to fix? |
Looks like https://github.com/caskroom/homebrew-cask/blob/master/lib/hbc/cli.rb#L226 is where it's getting the verbose option from, though the |
@zmwangx Looks like this may be an issue for Homebrew, not us: https://github.com/Homebrew/homebrew/blob/80bdf34/Library/brew.rb#L178 |
@jawshooah Hmm sounds right, but I imagine it would be hard for me to press them to switch to stderr, since they seem to dump error-related stuff to stdout in more than one place, and more importantly, their native commands do the (almost) right thing of only dumping when there is an error... I suppose the |
In any case, can we agree that this is a minor regression? |
So, in Homebrew/legacy-homebrew/issues/46387 and Homebrew/legacy-homebrew/pull/46790 |
I know. What I'm saying is |
That would probably make things easier, but no. The |
Yes, this is a minor regression. The question is whether we can do anything about it from our side, and it looks like the answer is no. Please feel free to open an issue over on Homebrew and link back here. |
Thanks for the clarifications (as I said I'm not familiar with Ruby).
Sounds reasonable. Any suggestions on how to solve this problem, i.e., what to report to homebrew/homebrew? |
I'd suggest you open an issue reporting exactly the problem you've reported here, and linking back to this issue for reference. |
Thanks, reported in Homebrew/legacy-homebrew#47099. |
It's because of setting |
I believe we've done all we can here, so I'll go ahead and close this. |
Description of issue
I'm currently using latest master, 1a25170. A brief demonstration:
Same for other cask subcommands. Apparently,
Kernel.exit
shouldn't be printed tostdout
, and actually shouldn't be printed at all without some form of--verbose
. This breaks my personal plugin script that prints the staged path of a cask (as well as other scripts depending on that plugin), as it now contains an extra line.P.S. Here's my plugin script
brewcask-stagedpath.rb
:Output of
brew cask whatevercommand --verbose
N/A, see description above.
Output of
brew doctor
https://gist.github.com/anonymous/e9a2c6f167a319019c54
Output of
brew cask doctor
https://gist.github.com/anonymous/be228d1b84a2f0ef6832
The text was updated successfully, but these errors were encountered: