1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-26 02:08:37 +08:00

fix(nvm): use command cat to avoid alias (#12410)

This commit is contained in:
Kiran Koirala 2024-05-10 15:53:35 +05:45 committed by GitHub
parent b1af78d64d
commit 9af7ebcf36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,7 @@ function _omz_setup_autoload {
zstyle -t ':omz:plugins:nvm' silent-autoload && nvm_silent="--silent" zstyle -t ':omz:plugins:nvm' silent-autoload && nvm_silent="--silent"
if [[ -n "$nvmrc_path" ]]; then if [[ -n "$nvmrc_path" ]]; then
local nvmrc_node_version=$(nvm version $(cat "$nvmrc_path" | tr -dc '[:print:]')) local nvmrc_node_version=$(nvm version $(command cat "$nvmrc_path" | tr -dc '[:print:]'))
if [[ "$nvmrc_node_version" = "N/A" ]]; then if [[ "$nvmrc_node_version" = "N/A" ]]; then
nvm install nvm install