Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions eng/scripts/Invoke-GenerateAndBuildV2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,19 @@ if ($relatedTypeSpecProjectFolder) {
Write-Error "Failed to install tsp-client dependencies"
exit $LASTEXITCODE
}

# Use tsp-client from pinned version by running from tsp-client directory
$tspclientCommand = "npm exec --no -- tsp-client init --update-if-exists --tsp-config $tspConfigFile --repo $repo --commit $commitid"
if ($swaggerDir) {
$tspclientCommand += " --local-spec-repo $typespecFolder"
}
Write-Host $tspclientCommand
Invoke-Expression $tspclientCommand
}
finally {
Pop-Location
}

# Use tsp-client from pinned version by passing --prefix to use tsp-client from that directory
$tspclientCommand = "npm exec --prefix $tspClientDir --no -- tsp-client init --update-if-exists --tsp-config $tspConfigFile --repo $repo --commit $commitid"
if ($swaggerDir) {
$tspclientCommand += " --local-spec-repo $typespecFolder"
}
Write-Host $tspclientCommand
Invoke-Expression $tspclientCommand

if ($LASTEXITCODE) {
# If Process script call fails, then return with failure to CI and don't need to call GeneratePackage
Write-Host "[ERROR] Failed to generate typespec project:$typespecFolder. Exit code: $LASTEXITCODE. Please review the detail errors for potential fixes. If the issue persists, contact the DotNet language support channel at $DotNetSupportChannelLink and include this spec pull request."
Expand Down