File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
etc/nodenv.d/version-origin Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change
1
+ target_dir=" $1 "
2
+ find_nvmrc_file () {
3
+ local root=" $1 "
4
+ while ! [[ " $root " =~ ^//[^/]* $ ]]; do
5
+ if [ -e " ${root} /.nvmrc" ]; then
6
+ NODENV_VERSION_ORIGIN=" ${root} /.nvmrc"
7
+ return 0
8
+ fi
9
+ [ -n " $root " ] || break
10
+ root=" ${root%/* } "
11
+ done
12
+ return 1
13
+ }
14
+
15
+ if ! NODENV_NVMRC_VERSION=$( nodenv-nvmrc) ; then
16
+ exit 1
17
+ elif [ -n " $NODENV_NVMRC_VERSION " ]; then
18
+ find_nvmrc_file " $NODENV_DIR "
19
+ fi
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nodenv-nvmrc" ,
3
- "version" : " 1.0.0 " ,
3
+ "version" : " 1.0.1 " ,
4
4
"private" : true ,
5
5
"description" : " Activate a nodenv node version from .nvmrc" ,
6
6
"homepage" : " https://github.com/ouchxp/nodenv-nvmrc#readme" ,
You can’t perform that action at this time.
0 commit comments