Fix brew cask doctor for non-standard installation location#4320
Merged
reitermarkus merged 2 commits intoHomebrew:masterfrom Jun 18, 2018
lucafavatella:brew-cask-doctor
Merged
Fix brew cask doctor for non-standard installation location#4320reitermarkus merged 2 commits intoHomebrew:masterfrom lucafavatella:brew-cask-doctor
brew cask doctor for non-standard installation location#4320reitermarkus merged 2 commits intoHomebrew:masterfrom
lucafavatella:brew-cask-doctor
Conversation
Contributor
Author
|
I see codecov/patch job failed but I have no idea whether it is expected, and it is unclear to me how I may address it. These changes delete some unused code so I would expect code coverage percentage to increase rather. |
Member
The latter, mine shows Try adding/deleting a system language in System Preferences. |
reitermarkus
requested changes
Jun 11, 2018
Member
There was a problem hiding this comment.
This should also use user_tilde.
Contributor
Author
There was a problem hiding this comment.
Addressed. Rebased on master and force-pushed.
Symptom (relevant portions): ``` $ brew cask doctor ==> Homebrew-Cask Version Homebrew-Cask 1.6.7-56-g9ebcef7 Homebrew/homebrew-cask (git revision fc24e; last commit 2018-06-09) ==> macOS 10.13.5 ==> SIP Enabled ... ==> Homebrew-Cask Install Location <NONE> ==> Homebrew-Cask Staging Location ~/homebrew/Caskroom ... ==> Environment Variables HOMEBREW_CASK_OPTS="--appdir=~/Applications" LC_ALL="en_US.UTF-8" PATH="/usr/bin:/bin:/usr/sbin:/sbin:~/homebrew/Library/Homebrew/shims/scm" SHELL="/bin/bash" Cask's Doctor Checkup: failed - The staging path ~/homebrew/Caskroom does not exist. Error: There are some problems with your setup. ``` Analysis: * The source code is [this](https://github.com/Homebrew/brew/blob/9ebcef785eed097be709bffef97263b5f536ba34/Library/Homebrew/cask/lib/hbc/cli/doctor.rb#L63-L66). * The issue is reproducible in `brew irb`: ``` $ ls -dl ~/homebrew/Caskroom drwxrwxr-x 10 luca admin 340 9 Jun 16:22 /Users/luca/homebrew/Caskroom $ ( cd ~ && pwd; ) /Users/luca $ ls -dl /Users/luca/homebrew/Caskroom drwxrwxr-x 10 luca admin 340 9 Jun 16:22 /Users/luca/homebrew/Caskroom $ brew irb ==> Interactive Homebrew Shell Example commands available with: brew irb --examples irb(main):001:0> Pathname.new("~/homebrew/Caskroom").exist? => false irb(main):002:0> Pathname.new("/Users/luca/homebrew/Caskroom").exist? => true ```
reitermarkus
approved these changes
Jun 18, 2018
Member
|
Thanks, @lucafavatella, nice cleanup! |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew updateseveral times.brew doctorshows one warningWarning: Your Homebrew's prefix is not /usr/local.brew doctornot to be non-zero only for the non-standard prefix - for automated check.)Library/Homebrew/test/cmd/doctor_spec.rbthough I am not sure how I would write a test for this fix. Guidance welcome.brew stylewith your changes locally?brew testswith your changes locally?I think the test is making a wrong assumption on system configuration, or my system has broken language config: