mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
bundler plugin was not working if the project didn't have bundler
This commit is contained in:
parent
129e13dbc1
commit
c06b1c0d9a
@ -8,17 +8,17 @@ end
|
|||||||
function _within-bundled-project
|
function _within-bundled-project
|
||||||
set -l check_dir $PWD
|
set -l check_dir $PWD
|
||||||
while [ $check_dir != "/" ]
|
while [ $check_dir != "/" ]
|
||||||
[ -f "$check_dir/Gemfile" ] and return
|
test -f "$check_dir/Gemfile"; and return
|
||||||
set check_dir (dirname $check_dir)
|
set check_dir (dirname $check_dir)
|
||||||
end
|
end
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
function _run-with-bundler
|
function _run-with-bundler
|
||||||
if _bundler-installed and _within-bundled-project
|
if begin; _bundler-installed; and _within-bundled-project; end
|
||||||
command bundle exec $argv
|
command bundle exec $argv
|
||||||
else
|
else
|
||||||
$argv
|
eval command $argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user