[Fix] nvm_process_nvmrc_content: a key containing a space is not a duplicate of each word in it
The duplicate-key check kept keys in a space-separated list, so a key such as `a b` followed by a key `a` or `b` was reported as a duplicate, unlike in the `nvmrc` package. Keep the keys newline-separated, since a key cannot contain a newline.
This commit is contained in:
2 files changed
+10
-5
No files matched your search
@@ -25,7 +25,7 @@ ${KEY} = 3"
|
||||
done
|
||||
|
||||
# keys are compared as they are written, not as patterns
|
||||
for KEY in b ab A a. '*' '.*' '?' 'a|b' '[a]'; do
|
||||
for KEY in b ab A a. '*' '.*' '?' 'a|b' '[a]' 'a b' 'b a' 'b a'; do
|
||||
for CONTENT in "20
|
||||
a=1
|
||||
${KEY}=2" "20
|
||||
|
||||
Reference in new issue
Block a user