Skip to content

Commit

Permalink
Fix: osx PATH on sub shells (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioAntunes authored Nov 25, 2019
1 parent 6a6d661 commit 740cd48
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions functions/__nvm_run.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ function __nvm_run
return 1
end

if test (uname -s) = 'Darwin'; and string match -q "*versions/node/*/bin" $PATH
set -l nvm_node_path (string match "*versions/node/*/bin" $PATH)
set -l nvm_index (contains -i -- $nvm_node_path $PATH)
if test $nvm_index -gt 1
set -gx PATH $nvm_node_path (string match -v $nvm_node_path $PATH)
end
end

function run_command
set stack (status stack-trace | grep called | cut -d " " -f 7)
set count (count $argv)
Expand Down

0 comments on commit 740cd48

Please sign in to comment.