@@ -82,10 +82,28 @@ steps:
8282 condition : and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
8383 displayName : Setup NPM Authentication
8484
85+ - powershell : |
86+ mkdir -Force .build/node-gyp
87+ displayName: Create custom node-gyp directory
88+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
89+
90+ - powershell : |
91+ . ../../build/azure-pipelines/win32/exec.ps1
92+ $ErrorActionPreference = "Stop"
93+ # TODO: Should be replaced with upstream URL once https://github.com/nodejs/node-gyp/pull/2825
94+ # gets merged.
95+ exec { git clone https://github.com/rzhao271/node-gyp.git . } "Cloning rzhao271/node-gyp failed"
96+ exec { git checkout 102b347da0c92c29f9c67df22e864e70249cf086 } "Checking out 102b347 failed"
97+ exec { npm install } "Building rzhao271/node-gyp failed"
98+ displayName: Install custom node-gyp
99+ workingDirectory: .build/node-gyp
100+ condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
101+
85102 - powershell : |
86103 . build/azure-pipelines/win32/exec.ps1
87104 . build/azure-pipelines/win32/retry.ps1
88105 $ErrorActionPreference = "Stop"
106+ $env:npm_config_node_gyp="$(Join-Path $pwd.Path '.build/node-gyp/bin/node-gyp.js')"
89107 $env:npm_config_arch="$(VSCODE_ARCH)"
90108 $env:CHILD_CONCURRENCY="1"
91109 retry { exec { yarn --frozen-lockfile --check-files } }
0 commit comments