Commit 480ca220 authored by Helge Rausch's avatar Helge Rausch
Browse files

Make bundler plugin run binstubbed cmd if existing

parent 3913106b
...@@ -47,9 +47,17 @@ _within-bundled-project() { ...@@ -47,9 +47,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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment