From fc44c49cca9d5e499097392d3f42b1375d0253ba Mon Sep 17 00:00:00 2001 From: Zeragamba Date: Thu, 1 Dec 2022 13:49:41 -0500 Subject: [PATCH] fix(nvm): trim non-printable chars from .nvmrc (#10997) --- plugins/nvm/nvm.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/nvm/nvm.plugin.zsh b/plugins/nvm/nvm.plugin.zsh index c5799c88e..a4ff29cf1 100644 --- a/plugins/nvm/nvm.plugin.zsh +++ b/plugins/nvm/nvm.plugin.zsh @@ -68,7 +68,7 @@ if zstyle -t ':omz:plugins:nvm' autoload; then zstyle -t ':omz:plugins:nvm' silent-autoload && _nvm_silent="--silent" if [[ -n "$nvmrc_path" ]]; then - local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") + local nvmrc_node_version=$(nvm version $(cat "$nvmrc_path" | tr -dc '[:print:]')) if [[ "$nvmrc_node_version" = "N/A" ]]; then nvm install