Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3487 from MikeMcQuaid/dev-env-filtering
Enable environment filtering for developers.
- Loading branch information
Showing
3 changed files
with
24 additions
and
10 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
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
f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, this commit breaks my custom
brewcask-*
scripts that I have installed into /usr/local/bin. It causes them to behave as if it is an unknown command (it just spits out the default "help" text).If I set
HOMEBREW_NO_ENV_FILTERING=true
prior to running one of my custombrewcask-*
. This is an OK workaround for me - and, admittedly, I'm in the minority with my custom scripts...but I thought I'd report the breakage in case it needed to be looked at.f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toonetown That is intentional. It will likely break anywhere you're relying on custom, non-
HOMEBREW_
environment variables being passed to your scripts. That is not supported behaviour so you should not rely on it, sorry.f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is OK - but it doesn't even look like the scripts are being called in the first place. I'm not relying upon any specific environment variables in the scripts themselves. This can be proven out by having a single script (in this example, called
/usr/local/bin/brewcask-ndt
):With that script in place (and executable), I am unable to run
brew cask ndt
:However, without environment filtering, it runs correctly:
Again - if this is intended behavior, then that is OK. I just want to make sure there are no regressions.
f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an additional note - I can run custom
brew-*
scripts...just not custombrewcask-*
scripts.f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toonetown It may be those scripts are just filtered out of your
PATH
. Can you try to add them to a tap temporarily?f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - do I just place them in a
bin
directory in any tap? (I've never added custom command scripts to a tap before)f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toonetown the
cmd
directoryf262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't get custom
brewcask-*
scripts to load from a tap'scmd
directory...either with or without theHOMEBREW_NO_ENV_FILTERING
. I can get custombrew-*
scripts to load from thecmd
directory.I'll keep digging. Sounds like it's likely a problem with my setup.
f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reitermarkus Should they be working from your perspective?
f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toonetown Should be fixed now!
f262cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeMcQuaid it does, thanks!