We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24baacd commit c029b6aCopy full SHA for c029b6a
etc/nodenv.d/version-origin/nvmrc.bash
@@ -0,0 +1,19 @@
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
package.json
@@ -1,6 +1,6 @@
{
"name": "nodenv-nvmrc",
- "version": "1.0.0",
+ "version": "1.0.1",
"private": true,
"description": "Activate a nodenv node version from .nvmrc",
"homepage": "https://github.com/ouchxp/nodenv-nvmrc#readme",
0 commit comments