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

Make it work as non-admin #127

Open
magnusviri opened this issue Feb 9, 2021 · 3 comments
Open

Make it work as non-admin #127

magnusviri opened this issue Feb 9, 2021 · 3 comments

Comments

@magnusviri
Copy link

I am logged in as a non-admin user. If I try to whalebrew install something it fails to create the file in /usr/local/bin. Can you add an option to install it in the cwd or something?

@tjamet
Copy link
Contributor

tjamet commented Feb 11, 2021

Hi!
Thanks for raising.
Indeed, the default installation path is /usr/local/bin but you can configure this path using the WHALEBREW_INSTALL_PATH environment variable.

Note that doing so, you will need to also update your PATH so you can run the installed packages: export PATH=${PATH}:${WHALEBREW_INSTALL_PATH}

Would that solve your problem?

@lsloan
Copy link

lsloan commented Jul 14, 2022

Setting WHALEBREW_INSTALL_PATH works, but I think it's not the best solution. Could whalebrew install into the Homebrew directory by default? That is, use Homebrew's HOMEBREW_PREFIX and append /bin.

For example, my HOMEBREW_PREFIX is set to /Users/lsloan/homebrew, so things get installed in the bin subdirectory there. whalebrew is installed as /Users/lsloan/homebrew/bin/whalebrew. If whalebrew could then install things there, that'd be perfect. The Homebrew bin directory is already in my path, so there's no need to worry about changing that.

As a proof of concept, I tried it like this…

$ WHALEBREW_INSTALL_PATH=`brew --prefix`'/bin' whalebrew install whalebrew/whalesay
🐳  Installed whalebrew/whalesay to /Users/lsloan/homebrew/bin/whalesay
$ whalesay FUBAR
 _______
< FUBAR >
 -------
    \
     \
      \
                    ##         .
              ## ## ##        ==
           ## ## ## ## ##    ===
       /"""""""""""""""""\___/ ===
  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
       \______ o           __/
         \    \         __/
          \____\_______/

@jmlnik
Copy link

jmlnik commented Jul 15, 2022

I'm having similar problems overriding the install path due to homebrew changes on Apple Silicon and WHALEBREW_INSTALL_PATH not working with brew bundle.

I've made some suggestions open for comment here #191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants