mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Make bundler plugin run binstubbed cmd if existing
This commit is contained in:
parent
1565cb727c
commit
1a39d7bc24
1 changed files with 9 additions and 1 deletions
|
|
@ -48,9 +48,17 @@ _within-bundled-project() {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_binstubbed() {
|
||||||
|
[ -f "./bin/${1}" ]
|
||||||
|
}
|
||||||
|
|
||||||
_run-with-bundler() {
|
_run-with-bundler() {
|
||||||
if _bundler-installed && _within-bundled-project; then
|
if _bundler-installed && _within-bundled-project; then
|
||||||
bundle exec $@
|
if _binstubbed $1; then
|
||||||
|
bundle exec "./bin/$@"
|
||||||
|
else
|
||||||
|
bundle exec $@
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
$@
|
$@
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue