@@ -264,33 +264,33 @@ extends:
264
264
workingDirectory: $(Build.SourcesDirectory)/eng/common/tsp-client
265
265
266
266
- pwsh : |
267
- Write-Host "Overrides location: $(buildArtifactsPath)/packages/overrides.json"
268
-
269
267
# Resolve EmitterPackageJsonOutputPath to absolute path if it's relative
270
268
$emitterPath = '${{ parameters.EmitterPackageJsonOutputPath }}'
271
269
if (-not [System.IO.Path]::IsPathRooted($emitterPath)) {
272
270
$emitterPath = Join-Path '$(Build.SourcesDirectory)' $emitterPath
273
271
}
274
- Write-Host "Resolved emitter package path: $emitterPath"
272
+ Write-Host "##vso[task.setvariable variable=ResolvedEmitterPath]$emitterPath"
273
+ displayName: Resolve emitter package path
274
+ workingDirectory: $(Build.SourcesDirectory)
275
+
276
+ - pwsh : |
277
+ Write-Host "Overrides location: $(buildArtifactsPath)/packages/overrides.json"
278
+ Write-Host "Resolved emitter package path: $(ResolvedEmitterPath)"
275
279
276
280
if (Test-Path -Path '$(buildArtifactsPath)/packages/overrides.json') {
277
281
Write-Host "Using overrides.json to generate emitter-package.json"
278
- Push-Location $(Build.SourcesDirectory)/eng/common/tsp-client
279
282
npm exec --no -- tsp-client generate-config-files `
280
283
--package-json '$(buildArtifactsPath)/lock-files/package.json' `
281
- --emitter-package-json-path "$emitterPath" `
284
+ --emitter-package-json-path '$(ResolvedEmitterPath)' `
282
285
--overrides '$(buildArtifactsPath)/packages/overrides.json'
283
- Pop-Location
284
286
} else {
285
287
Write-Host "No overrides.json found. Running tsp-client without overrides."
286
- Push-Location $(Build.SourcesDirectory)/eng/common/tsp-client
287
288
npm exec --no -- tsp-client generate-config-files `
288
289
--package-json '$(buildArtifactsPath)/lock-files/package.json' `
289
- --emitter-package-json-path "$emitterPath"
290
- Pop-Location
290
+ --emitter-package-json-path '$(ResolvedEmitterPath)'
291
291
}
292
292
displayName: Generate emitter-package.json and emitter-package-lock files
293
- workingDirectory: $(Build.SourcesDirectory)
293
+ workingDirectory: $(Build.SourcesDirectory)/eng/common/tsp-client
294
294
295
295
- ${{ parameters.InitializationSteps }}
296
296
0 commit comments