mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-01-23 11:32:17 +08:00
fix: update Volta version parsing to match current output format
This commit is contained in:
parent
5291eae55a
commit
9d89a67162
@ -16,7 +16,8 @@ typeset -gA node_info
|
||||
if (( $+commands[nodenv] )); then
|
||||
version="${${$(nodenv version)#v}[(w)0]}"
|
||||
elif (( $+commands[volta] )); then
|
||||
version="${${$(volta list node | grep 'default')#⚡ }[(w)2]}"
|
||||
# Parse Volta output format: "runtime node@22.12.0 (default)"
|
||||
version="${${$(volta list node | grep 'default')#*@}%% *}"
|
||||
elif (( $+functions[nvm_version] )); then
|
||||
version="${$(nvm_version)#v}"
|
||||
elif (( $+commands[node] )) ; then
|
||||
|
Loading…
Reference in New Issue
Block a user