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