Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

vscode unable to resolve your shell environment

function load-nvm {
  export NVM_DIR="$HOME/.nvm"
  [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
  [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
  [[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh
}

# nvm
if [[ "x${TERM_PROGRAM}" = "xvscode" ]]; then 
  echo 'in vscode, nvm not work; use `load-nvm`';
else 
  load-nvm
fi
 
PREVIOUS NEXT
Tagged: #vscode #unable #resolve #shell #environment
ADD COMMENT
Topic
Name
7+9 =