mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 15:53:22 +01:00
Merge pull request #2885 from tsujigiri/bundler/run_binstubbed
Make bundler plugin run binstubbed cmd if existing
This commit is contained in:
commit
c925aabea9
@ -48,9 +48,17 @@ _within-bundled-project() {
|
||||
false
|
||||
}
|
||||
|
||||
_binstubbed() {
|
||||
[ -f "./bin/${1}" ]
|
||||
}
|
||||
|
||||
_run-with-bundler() {
|
||||
if _bundler-installed && _within-bundled-project; then
|
||||
bundle exec $@
|
||||
if _binstubbed $1; then
|
||||
bundle exec "./bin/$@"
|
||||
else
|
||||
bundle exec $@
|
||||
fi
|
||||
else
|
||||
$@
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user