Browse Source

Remove logs from automatic version switching in `--use-on-cd` (#289)

remotes/origin/add-with-shims
Max Jacobson 4 years ago committed by GitHub
parent
commit
d5bab7e1db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/shell/bash.rs
  2. 2
      src/shell/fish.rs
  3. 2
      src/shell/zsh.rs

2
src/shell/bash.rs

@ -25,10 +25,8 @@ impl Shell for Bash {
cd "$@" cd "$@"
if [[ -f .node-version && .node-version ]]; then if [[ -f .node-version && .node-version ]]; then
echo "fnm: Found .node-version"
fnm use fnm use
elif [[ -f .nvmrc && .nvmrc ]]; then elif [[ -f .nvmrc && .nvmrc ]]; then
echo "fnm: Found .nvmrc"
fnm use fnm use
fi fi
} }

2
src/shell/fish.rs

@ -24,10 +24,8 @@ impl Shell for Fish {
function _fnm_autoload_hook --on-variable PWD --description 'Change Node version on directory change' function _fnm_autoload_hook --on-variable PWD --description 'Change Node version on directory change'
status --is-command-substitution; and return status --is-command-substitution; and return
if test -f .node-version if test -f .node-version
echo "fnm: Found .node-version"
fnm use fnm use
else if test -f .nvmrc else if test -f .nvmrc
echo "fnm: Found .nvmrc"
fnm use fnm use
end end
end end

2
src/shell/zsh.rs

@ -24,10 +24,8 @@ impl Shell for Zsh {
autoload -U add-zsh-hook autoload -U add-zsh-hook
_fnm_autoload_hook () { _fnm_autoload_hook () {
if [[ -f .node-version && -r .node-version ]]; then if [[ -f .node-version && -r .node-version ]]; then
echo "fnm: Found .node-version"
fnm use fnm use
elif [[ -f .nvmrc && -r .nvmrc ]]; then elif [[ -f .nvmrc && -r .nvmrc ]]; then
echo "fnm: Found .nvmrc"
fnm use fnm use
fi fi
} }

Loading…
Cancel
Save