Skip to content

environment: line 1: set_node_version: command not found #2456

Discussion options

You must be logged in to vote

hey, Happy Friday
so I ran grep set_node_version ~/.* /etc/* /etc/profile.d/*
removing all the grep: xxxxxxx: Is a directory results:

/home/vagrant/.bashrc:function set_node_version {
/home/vagrant/.bashrc:  set_node_version
/home/vagrant/.bashrc:  set_node_version
/home/vagrant/.bashrc:  set_node_version

then I cat ~/.bashrc and the relevant part is:

function set_node_version {
        if test -f "./package.json"; then
                if test -f "./.nvmrc"; then
                        nvm use
                        return;
                fi

                nvm use default
        fi
}

function cd {
        builtin cd "$@" || return

  set_node_version
}

function pushd {
        bu…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@mislav
Comment options

@jaderzanotti
Comment options

@mislav
Comment options

@jaderzanotti
Comment options

Answer selected by mislav
@mislav
Comment options

Comment options

You must be logged in to vote
1 reply
@jaderzanotti
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants