Skip to content

Commit

Permalink
Migrate scope change via update handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran committed Apr 29, 2023
1 parent 6eed481 commit aa5ccbd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion conf.d/nvm.fish
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
set --global nvm_data $XDG_DATA_HOME/nvm

Expand All @@ -8,6 +8,12 @@ function _nvm_install --on-event nvm_install
_nvm_index_update
end

function _nvm_update --on-event nvm_update
set --query --universal nvm_data && set --erase --universal nvm_data
set --query --universal nvm_mirror && set --erase --universal nvm_mirror
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
end

function _nvm_uninstall --on-event nvm_uninstall
command rm -rf $nvm_data

Expand Down

0 comments on commit aa5ccbd

Please sign in to comment.