[Fix] nvm_strip_path: preserve literal backslashes in NVM_DIR
This commit is contained in:
1 parent
5e38bc0cae
commit
8486d07a5e
2 files changed
+8
-1
No files matched your search
@@ -1527,7 +1527,8 @@ nvm_strip_path() {
|
||||
return 1
|
||||
fi
|
||||
local RESULT
|
||||
RESULT="$(command printf %s "${1-}" | command awk -v NVM_DIR="${NVM_DIR}" -v RS=: '
|
||||
RESULT="$(command printf %s "${1-}" | NVM_DIR="${NVM_DIR}" command awk -v RS=: '
|
||||
BEGIN { NVM_DIR = ENVIRON["NVM_DIR"] }
|
||||
index($0, NVM_DIR) == 1 {
|
||||
path = substr($0, length(NVM_DIR) + 1)
|
||||
if (path ~ "^(/versions/[^/]*)?/[^/]*'"${2-}"'.*$") { next }
|
||||
|
||||
Reference in new issue
Block a user