@@ -259,24 +259,38 @@ extends:
259
259
displayName : Download pipeline artifacts
260
260
261
261
- pwsh : |
262
- npm install -g @azure-tools/typespec-client-generator-cli@latest
262
+ Push-Location eng/common/tsp-client
263
+ try {
264
+ npm ci
265
+ } finally {
266
+ Pop-Location
267
+ }
263
268
displayName: Install tsp-client
264
269
265
270
- pwsh : |
266
271
Write-Host "Overrides location: $(buildArtifactsPath)/packages/overrides.json"
267
272
268
273
if (Test-Path -Path '$(buildArtifactsPath)/packages/overrides.json') {
269
274
Write-Host "Using overrides.json to generate emitter-package.json"
270
- tsp-client generate-config-files `
271
- --package-json '$(buildArtifactsPath)/lock-files/package.json' `
272
- --emitter-package-json-path '${{ parameters.EmitterPackageJsonOutputPath }}' `
273
- --overrides '$(buildArtifactsPath)/packages/overrides.json'
275
+ Push-Location eng/common/tsp-client
276
+ try {
277
+ npm exec --no -- tsp-client generate-config-files `
278
+ --package-json '$(buildArtifactsPath)/lock-files/package.json' `
279
+ --emitter-package-json-path '$(Build.SourcesDirectory)/${{ parameters.EmitterPackageJsonOutputPath }}' `
280
+ --overrides '$(buildArtifactsPath)/packages/overrides.json'
281
+ } finally {
282
+ Pop-Location
283
+ }
274
284
} else {
275
285
Write-Host "No overrides.json found. Running tsp-client without overrides."
276
-
277
- tsp-client generate-config-files `
278
- --package-json '$(buildArtifactsPath)/lock-files/package.json' `
279
- --emitter-package-json-path '${{ parameters.EmitterPackageJsonOutputPath }}'
286
+ Push-Location eng/common/tsp-client
287
+ try {
288
+ npm exec --no -- tsp-client generate-config-files `
289
+ --package-json '$(buildArtifactsPath)/lock-files/package.json' `
290
+ --emitter-package-json-path '$(Build.SourcesDirectory)/${{ parameters.EmitterPackageJsonOutputPath }}'
291
+ } finally {
292
+ Pop-Location
293
+ }
280
294
}
281
295
displayName: Generate emitter-package.json and emitter-package-lock files
282
296
workingDirectory: $(Build.SourcesDirectory)
0 commit comments