[readme] cdnvm(): handle failed dir change
If cd command fails, return whatever cd returned, instead of marching ahead
parent
95269ff055
commit
5a4e9184f1
|
@ -555,7 +555,7 @@ Put the following at the end of your `$HOME/.bashrc`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cdnvm() {
|
cdnvm() {
|
||||||
command cd "$@";
|
command cd "$@" || return $?
|
||||||
nvm_path=$(nvm_find_up .nvmrc | tr -d '\n')
|
nvm_path=$(nvm_find_up .nvmrc | tr -d '\n')
|
||||||
|
|
||||||
# If there are no .nvmrc file, use the default nvm version
|
# If there are no .nvmrc file, use the default nvm version
|
||||||
|
|
Loading…
Reference in New Issue