1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-11 00:10:08 +00:00

Merge pull request #2885 from tsujigiri/bundler/run_binstubbed

Make bundler plugin run binstubbed cmd if existing
This commit is contained in:
Robby Russell 2014-07-15 07:40:48 -07:00
commit c925aabea9

View file

@ -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
if _binstubbed $1; then
bundle exec "./bin/$@"
else
bundle exec $@ bundle exec $@
fi
else else
$@ $@
fi fi