Skip to content

Commit

Permalink
fix: node repl issue starting on version 11.10.*
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioAntunes committed Mar 14, 2019
1 parent 06cd4c8 commit 6074941
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions functions/__nvm_run.fish
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ function __nvm_run
end

if type -fqP $argv[1]; and test "$stack[1]" != (which $argv[1])
# https://stackoverflow.com/questions/45237675/proxying-arguments-from-one-function-to-a-command/45238056#45238056
eval (string escape -- (type -fP $argv[1]) $args)
set count (count $argv)
if test "$count" -ge 2
set args $argv[2..-1]

# https://stackoverflow.com/questions/45237675/proxying-arguments-from-one-function-to-a-command/45238056#45238056
eval (string escape -- (type -fP $argv[1]) $args)
else
eval (string escape -- (type -fP $argv[1]))
end
else
echo (set_color -o)"Fish nvm:"(set_color normal) "'$argv[1]' is currently not installed, try running npm i -g $argv[1]"
return 1
Expand Down

0 comments on commit 6074941

Please sign in to comment.