Skip to content

nvm current reverts the used node version #13

@taktran

Description

@taktran

I noticed that when I create a nvm function, as suggested in the readme, it reverts the currently used node version (from an .nvmrc file)

ie,

In .config/fish/functions/nvm.fish

function nvm
    bass source ~/.nvm/nvm.sh ';' nvm $argv
end

In a directory where I have a .nvmrc file with iojs-v2.2.1 and I run

$ nvm use
Found /Users/ttt/Work/Dev/folder/.nvmrc with version <iojs-v2.2.1>
Now using io.js v2.2.1
$ which node
/Users/ttt/.nvm/versions/io.js/v2.2.1/bin/node

which is good. But then when I run nvm current:

$ nvm current
v4.1.1
$ which node
/Users/ttt/.nvm/versions/node/v4.1.1/bin/node

It reverts back to my default version, which in this case is v4.1.1. Same for other functions that read the status of nvm eg, nvm list

Is there a way to run current or other ready only functions without loading the default?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions