Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvm install can throw "Invalid redirection target" #140

Closed
deleteme opened this issue Feb 21, 2021 · 1 comment
Closed

nvm install can throw "Invalid redirection target" #140

deleteme opened this issue Feb 21, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@deleteme
Copy link

I encountered the following error when running nvm install.

~/.config/fish/functions/_nvm_index_update.fish (line 7): Invalid redirection target:
    ' >$index.temp 2>/dev/null && command mv $index.temp $index && return
      ^
in function '_nvm_index_update'
	called on line 32 of file ~/.config/fish/functions/nvm.fish
in function 'nvm' with arguments 'install'
usage: mv [-f | -i | -n] [-v] source target
       mv [-f | -i | -n] [-v] source ... directory
nvm: Invalid index or unavailable host: ""

I found these two related issues #130 and #139 but since I also experienced the error I figured I could track down some reproduction steps.

In Shell 1

  1. curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
  2. fisher install jorgebucaran/nvm.fish

In Shell 2

  1. nvm
  2. nvm install

The attached video demonstrates how to reproduce the bug:

nvm-error-repro-steps.mov

The error doesn't happen in new shells. When I noticed that nvm worked in a previously open shell, I assumed that nvm install would work too.

@jorgebucaran jorgebucaran added the bug Something isn't working label Feb 22, 2021
jorgebucaran added a commit that referenced this issue Feb 22, 2021
@jorgebucaran
Copy link
Owner

Fixed by making nvm_data and nvm_mirror universally scoped, so that they're immediately available to all running sessions after installing the plugin. Thank you! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants