mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
Merge pull request #1163 from sebthom/patch-1
[Fix] fix "find: warning: Unix filenames usually don't contain slashes" warning Fixes #871.
This commit is contained in:
commit
e0e1c0379a
2
nvm.sh
2
nvm.sh
@ -814,7 +814,7 @@ nvm_ls() {
|
|||||||
SEARCH_PATTERN="$(echo "${PATTERN}" | sed "s#\.#\\\.#g;")"
|
SEARCH_PATTERN="$(echo "${PATTERN}" | sed "s#\.#\\\.#g;")"
|
||||||
fi
|
fi
|
||||||
if [ -n "$NVM_DIRS_TO_SEARCH1$NVM_DIRS_TO_SEARCH2$NVM_DIRS_TO_SEARCH3" ]; then
|
if [ -n "$NVM_DIRS_TO_SEARCH1$NVM_DIRS_TO_SEARCH2$NVM_DIRS_TO_SEARCH3" ]; then
|
||||||
VERSIONS="$(command find "$NVM_DIRS_TO_SEARCH1"/* "$NVM_DIRS_TO_SEARCH2"/* "$NVM_DIRS_TO_SEARCH3"/* -name . -o -type d -prune -o -name "$PATTERN*" \
|
VERSIONS="$(command find "$NVM_DIRS_TO_SEARCH1"/* "$NVM_DIRS_TO_SEARCH2"/* "$NVM_DIRS_TO_SEARCH3"/* -name . -o -type d -prune -o -path "$PATTERN*" \
|
||||||
| command sed "
|
| command sed "
|
||||||
s#${NVM_VERSION_DIR_IOJS}/#versions/${NVM_IOJS_PREFIX}/#;
|
s#${NVM_VERSION_DIR_IOJS}/#versions/${NVM_IOJS_PREFIX}/#;
|
||||||
s#^${NVM_DIR}/##;
|
s#^${NVM_DIR}/##;
|
||||||
|
Loading…
Reference in New Issue
Block a user