File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,11 +119,16 @@ jobs:
119119 - name : Checkout repository
120120 uses : actions/checkout@v6
121121 with :
122- depth : 1
122+ fetch- depth : 1
123123
124124 - id : head-version
125125 name : Determine Node version for HEAD
126126 run : |
127+ if [[ ! -f ".nvmrc" ]]; then
128+ echo "::error::Cannot find .nvmrc in the HEAD commit."
129+ exit 1
130+ fi
131+
127132 NODE_VERSION=$(cat .nvmrc)
128133 echo "NODE_VERSION: ${NODE_VERSION}"
129134 echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT
@@ -133,12 +138,17 @@ jobs:
133138 uses : actions/checkout@v6
134139 with :
135140 ref : ${{ env.BASE_REF }}
136- depth : 1
141+ fetch- depth : 1
137142
138143 - name : ' Backport: Verify Node versions unchanged'
139144 env :
140145 HEAD_VERSION : ${{ steps.head-version.outputs.node_version }}
141146 run : |
147+ if [[ ! -f ".nvmrc" ]]; then
148+ echo "::error::Cannot find .nvmrc in the base commit."
149+ exit 1
150+ fi
151+
142152 BASE_VERSION=$(cat .nvmrc)
143153 echo "HEAD_VERSION: ${HEAD_VERSION}"
144154 echo "BASE_VERSION: ${BASE_VERSION}"
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ const checkNodeVersionsPlugin = {
8383 }
8484
8585 // Write the node version to `.nvmrc`.
86- writeFile (
86+ await writeFile (
8787 join ( __dirname , ".nvmrc" ) ,
8888 nodeVersion . substring ( "node" . length ) + "\n" ,
8989 "utf-8" ,
You can’t perform that action at this time.
0 commit comments