Skip to content

Clarify arcade upstream fix requirements for exit code propagation#33897

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/sub-pr-33896
Closed

Clarify arcade upstream fix requirements for exit code propagation#33897
Copilot wants to merge 2 commits intomainfrom
copilot/sub-pr-33896

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

The fix in this PR addresses exit code propagation in MAUI's eng/build.ps1 wrapper. @rmarinho requested the same fix be applied upstream to dotnet/arcade.

Investigation Results

Arcade structure differs from MAUI:

  • No eng/build.ps1 wrapper exists in arcade
  • Root Build.cmd directly calls eng/common/build.ps1
  • eng/common/build.ps1 has similar ExitWithExitCode 0 at end

Intentional CI behavior in arcade:

  • MSBuild-Core in eng/common/tools.ps1 deliberately returns exit code 0 in Azure Pipelines
  • Uses Write-PipelineSetResult -Result "Failed" to mark failures
  • Prevents "double logging" of errors in CI builds
  • Only applies when $ci -and $env:SYSTEM_TEAMPROJECT is set

Required Clarification

Any upstream fix must balance:

  1. Proper exit code propagation for non-CI scenarios (what this PR fixes)
  2. Preserving intentional CI behavior that prevents redundant Azure Pipelines errors

Options:

  • Fix eng/common/build.ps1 to capture and propagate exit codes (similar to this PR's approach)
  • Respect existing CI-specific behavior in MSBuild-Core
  • Alternative approach that handles both scenarios

Awaiting direction on approach before submitting arcade PR.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

PureWeen and others added 2 commits February 4, 2026 12:41
Previously, eng/build.ps1 always exited with 0 regardless of whether
the underlying build succeeded or failed. This caused Azure Pipelines
to show steps as 'succeeded' even when they failed (e.g., when the
.NET SDK was not found).

The fix captures $LASTEXITCODE after Invoke-Expression and uses it
as the script's exit code instead of always exiting 0.
Copilot AI changed the title [WIP] Fix build.ps1 to propagate exit codes Clarify arcade upstream fix requirements for exit code propagation Feb 4, 2026
Copilot AI requested a review from rmarinho February 4, 2026 19:01
Base automatically changed from investigate/windows-packaged-tests to main February 5, 2026 11:59
@rmarinho rmarinho closed this Feb 9, 2026
@rmarinho rmarinho deleted the copilot/sub-pr-33896 branch February 9, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants