File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ nvm_echo() {
22
22
}
23
23
}
24
24
25
+ nvm_cd () {
26
+ # shellcheck disable=SC1001,SC2164
27
+ \c d " $@ "
28
+ }
29
+
25
30
nvm_err () {
26
31
>&2 nvm_echo " $@ "
27
32
}
@@ -115,7 +120,7 @@ if [ -z "${NVM_DIR-}" ]; then
115
120
NVM_SCRIPT_SOURCE=" ${BASH_SOURCE[0]} "
116
121
fi
117
122
# shellcheck disable=SC1001
118
- NVM_DIR=" $( cd ${NVM_CD_FLAGS} " $( dirname " ${NVM_SCRIPT_SOURCE:- $0 } " ) " > /dev/null && \p wd) "
123
+ NVM_DIR=" $( nvm_cd ${NVM_CD_FLAGS} " $( dirname " ${NVM_SCRIPT_SOURCE:- $0 } " ) " > /dev/null && \p wd) "
119
124
export NVM_DIR
120
125
fi
121
126
unset NVM_SCRIPT_SOURCE 2> /dev/null
@@ -1845,7 +1850,7 @@ nvm_install_source() {
1845
1850
command mkdir -p " ${TMPDIR} " && \
1846
1851
command tar -x${tar_compression_flag} f " ${TARBALL} " -C " ${TMPDIR} " --strip-components 1 && \
1847
1852
VERSION_PATH=" $( nvm_version_path " ${PREFIXED_VERSION} " ) " && \
1848
- cd " ${TMPDIR} " && \
1853
+ nvm_cd " ${TMPDIR} " && \
1849
1854
./configure --prefix=" ${VERSION_PATH} " $ADDITIONAL_PARAMETERS && \
1850
1855
$make -j " ${NVM_MAKE_JOBS} " ${MAKE_CXX-} && \
1851
1856
command rm -f " ${VERSION_PATH} " 2> /dev/null && \
@@ -3022,7 +3027,7 @@ nvm() {
3022
3027
for LINK in $LINKS ; do
3023
3028
set +f; unset IFS # restore variable expansion
3024
3029
if [ -n " $LINK " ]; then
3025
- (cd " $LINK " && npm link)
3030
+ (nvm_cd " $LINK " && npm link)
3026
3031
fi
3027
3032
done
3028
3033
set +f; unset IFS # restore variable expansion in case $LINKS was empty
You can’t perform that action at this time.
0 commit comments