Comments (6)
While this module can and maybe should handle this case, it does seem like a useful feature to have in Homebrew itself, if only for consistency with how other subcommands behave. I opened Homebrew/brew#1514 for this.
from puppet-homebrew.
Huh. Well, that's not great.
Looks like this is an issue with puppet-homebrew
rather than brew
itself. We should be able to look up the aliases in a few different ways and keep that in mind when deciding whether or not to install.
Notes-to-self:
See:
[kevinc@atomicbox(zsh):/usr/local] brew install mosh
==> Installing dependencies for mobile-shell: protobuf
==> Installing mobile-shell dependency: protobuf
==> Downloading https://homebrew.bintray.com/bottles/protobuf-3.1.0.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring protobuf-3.1.0.el_capitan.bottle.tar.gz
==> Caveats
Editor support and examples have been installed to:
/usr/local/Cellar/protobuf/3.1.0/share/doc/protobuf
==> Summary
🍺 /usr/local/Cellar/protobuf/3.1.0: 253 files, 16M
==> Installing mobile-shell
==> Downloading https://homebrew.bintray.com/bottles/mobile-shell-1.2.6_3.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mobile-shell-1.2.6_3.el_capitan.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/mobile-shell/1.2.6_3: 13 files, 939.2K
[kevinc@atomicbox(zsh):/usr/local] brew install mosh
Warning: mobile-shell-1.2.6_3 already installed
I can't find an easy way to look up homebrew aliases. It looks like homebrew creates aliases manually, which makes it unlikely they've built a way to look these up automatically. This may help, but I'm not yet sure how to use this.
It looks like homebrew core knows about these, probably somewhere in the update payload. In /usr/local/Homebrew
, we seem to only have Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/mosh.rb
and Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mobile-shell.rb
... the latter would be the one we want to look at, but it looks like it's only a one-way lookup.
brew list mosh
in the case where mosh
is not installed returns this alias (Error: No such keg: /usr/local/Cellar/mobile-shell
), but that doesn't help us too much since it shows paths only when the package is installed.
Regardless of whether mosh
is installed, the first line of info
returns it's real name:
[kevinc@atomicbox(zsh):/usr/local] brew info mosh
mobile-shell: stable 1.2.6 (bottled), HEAD
# snip
Output parsing is gross, but it might be helpful in this case.
from puppet-homebrew.
Radical and probably-bad (haven't thought about it too hard) idea: do brew install
during the existence check phase. An "already-installed" result (happens quickly for installed packages) results in an existence-check-success. An "installing...installed" successful operation (as is currently done during the "install" phase) results in a no-op/notify install operation. An error gets captured and re-thrown during the "install" phase.
from puppet-homebrew.
This behavior is the same with the yum provider and aliases.
Just don't use the alias. Use the real package name.
from puppet-homebrew.
@zbentley It looks like this is now fixed due to Homebrew/brew#1520, please feel free to reopen the issue if that is not the case.
from puppet-homebrew.
Seems to be working now. Thanks!
from puppet-homebrew.
Related Issues (20)
- executing brew info from within puppet fails, but doing it manually in the shell works HOT 2
- Run brew commands from `/tmp` or similar public folder
- Unable to install from URL with mixed-case HOT 2
- Unable to install java8 due to sudo asking for password HOT 1
- Notify error when brew user has no privileges on cwd HOT 1
- fix puppet6 dependencies HOT 1
- fix PDK build in CI HOT 2
- privileged installers HOT 1
- Brewcask provider no longer works
- Dependency and Compatibility Versions HOT 1
- module doesn't support M1 installations HOT 6
- Unclear docs/recommendations for running as root (or not)
- Apple M1 Chip is installing Brew to usr/local/bin instead of /opt/homebrew
- Use proper homebrew installation script
- Update functionality does not work as expected HOT 3
- Fix bug for incomplete brew installations
- Handle better brew outputs
- /usr/local immutable on High Sierra
- Silently fails to install a package on first run of Puppet HOT 1
- /usr/local under High Sierra HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-homebrew.