mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
[New] Allow nvm_find_nvmrc
to use custom path and name
This commit is contained in:
parent
4bdd57ba0f
commit
db466ab0cb
7
nvm.sh
7
nvm.sh
@ -461,9 +461,10 @@ nvm_find_up() {
|
|||||||
|
|
||||||
nvm_find_nvmrc() {
|
nvm_find_nvmrc() {
|
||||||
local dir
|
local dir
|
||||||
dir="$(nvm_find_up '.nvmrc')"
|
local rcfile="${1:-.nvmrc}"
|
||||||
if [ -e "${dir}/.nvmrc" ]; then
|
dir="$(nvm_find_up "${rcfile}")"
|
||||||
nvm_echo "${dir}/.nvmrc"
|
if [ -e "${dir}/${rcfile}" ]; then
|
||||||
|
nvm_echo "${dir}/${rcfile}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user