Skip to content

Commit 0c54905

Browse files
committed
Evaluate NVS script directly
1 parent 0dc4af1 commit 0c54905

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

.github/workflows/windows_test_npm_install.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,20 +164,12 @@ jobs:
164164
echo ''
165165
echo 'Adding executable to PATH...'
166166
cygpath -u $(nvs which ${{ matrix.NODE_VERSION }}) >> $GITHUB_PATH
167-
echo ''
168-
echo 'Creating .bash_profile...'
169-
touch $HOME/.bash_profile
170-
echo "if [ -f $HOME/.bashrc ]; then . $HOME/.bashrc; fi" >> $HOME/.bash_profile
171-
echo ''
172-
echo 'Creating .bashrc...'
173-
touch $HOME/.bashrc
174-
echo ". ${{ env.NVS_HOME }}/nvs.sh" >> $HOME/.bashrc
175167
timeout-minutes: 15
176168

177169
# Print debug info:
178170
- name: 'Print debug info'
179171
run: |
180-
source $HOME/.bashrc
172+
. "${{ env.NVS_HOME }}/nvs.sh"
181173
echo 'PATH:'
182174
echo $PATH
183175
echo ''
@@ -205,7 +197,7 @@ jobs:
205197
# Update the npm client (older clients cannot handle scoped modules):
206198
- name: 'Update npm'
207199
run: |
208-
source $HOME/.bashrc
200+
. "${{ env.NVS_HOME }}/nvs.sh"
209201
npm install -g npm@"${{ matrix.NPM_VERSION }}"
210202
npm --version
211203
timeout-minutes: 5
@@ -221,14 +213,14 @@ jobs:
221213
# [2]: https://github.com/nodejs/node-gyp#installation
222214
- name: 'Install Windows build tools'
223215
run: |
224-
source $HOME/.bashrc
216+
. "${{ env.NVS_HOME }}/nvs.sh"
225217
npm install --global --production windows-build-tools
226218
timeout-minutes: 5
227219

228220
# Configure npm:
229221
- name: 'Configure npm'
230222
run: |
231-
source $HOME/.bashrc
223+
. "${{ env.NVS_HOME }}/nvs.sh"
232224
npm config set python "$USERPROFILE/.windows-build-tools/python38"
233225
npm config set msvs_version 2017
234226
timeout-minutes: 2
@@ -250,7 +242,7 @@ jobs:
250242
# Run the build task:
251243
- name: 'Run build task'
252244
run: |
253-
source $HOME/.bashrc
245+
. "${{ env.NVS_HOME }}/nvs.sh"
254246
cd $GITHUB_WORKSPACE
255247
chmod +x ./tools/ci/github/script
256248
"./tools/ci/github/script" ${{ matrix.BUILD_TASK }} || "./tools/ci/github/script" ${{ matrix.BUILD_TASK }}
@@ -260,7 +252,7 @@ jobs:
260252
- name: 'View log file'
261253
if: failure()
262254
run: |
263-
source $HOME/.bashrc
255+
. "${{ env.NVS_HOME }}/nvs.sh"
264256
cd $GITHUB_WORKSPACE
265257
chmod +x ./tools/ci/github/on_failure
266258
"./tools/ci/github/on_failure" ${{ matrix.BUILD_TASK }}

0 commit comments

Comments
 (0)