Skip to content

fix: return exit code 1 on parse errors - #1016

Open
Akhil Gupta (akhil9tiet) wants to merge 26 commits into
microsoft:mainfrom
akhil9tiet:fix/1015-parse-error-exit-code
Open

Akhil Gupta (akhil9tiet) wants to merge 26 commits into
microsoft:mainfrom
akhil9tiet:fix/1015-parse-error-exit-code

Conversation

@akhil9tiet

Copy link
Copy Markdown

Fixes #1015. Parse errors that print help (e.g. winapp cert bogus) exited with code 0, so scripts and agents treated them as success. InvokeAsync() displays the error and help text; this ensures the exit code is 1 when ParseResult.Errors is non-empty, matching the ui subcommands' behavior.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 20:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new await is inside a non-async lambda, causing Release builds and tests to fail compilation.

2 open findings

🧠 Review effort: Balanced

Comment thread src/winapp-CLI/WinApp.Cli/Program.cs
Comment thread src/winapp-CLI/WinApp.Cli/Program.cs
@akhil9tiet

Copy link
Copy Markdown
Author

Added missing await.

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.

[Bug]: Parse errors that print help exit 0 (e.g. winapp cert bogus)

4 participants