Skip to content
Open
Changes from 3 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d43f830
fix: return exit code 1 on parse errors
akhil9tiet Oct 7, 2026
9bdba15
Delete src/winapp-CLI/WinApp.Cli/Program.cs
akhil9tiet Oct 7, 2026
f76e481
fix: return exit code 1 on parse errors
akhil9tiet Oct 7, 2026
5c28e9e
Merge branch 'main' into fix/1015-parse-error-exit-code
zateutsch Oct 7, 2026
d3b7f1c
fix: make parse-error callback async (compilation fix)
akhil9tiet Oct 8, 2026
994ad2d
Delete src/winapp-CLI/WinApp.Cli/Program.cs
akhil9tiet Oct 8, 2026
21a4170
Rename winapp-Program-fix.cs to Program.cs
akhil9tiet Oct 8, 2026
772a4bb
test: regression for parse-error exit code 1
akhil9tiet Oct 8, 2026
30ef112
Delete src/winapp-CLI/WinApp.Cli.Tests/ProgramTests.cs
akhil9tiet Oct 8, 2026
e88cba2
Rename winapp-ProgramTests.cs to ProgramTests.cs
akhil9tiet Oct 8, 2026
8cb5472
Upload winapp-Program-rebased.cs (intermediate step)
akhil9tiet Oct 8, 2026
383952b
Delete src/winapp-CLI/WinApp.Cli/Program.cs
akhil9tiet Oct 8, 2026
b884eeb
fix: rebase exit-code fix onto current main (resolve conflict)
akhil9tiet Oct 8, 2026
915f370
Upload winapp-Program-proper.cs (intermediate step)
akhil9tiet Oct 8, 2026
6856c28
Delete src/winapp-CLI/WinApp.Cli/Program.cs
akhil9tiet Oct 8, 2026
d6fb795
fix: rebase exit-code fix onto current main with help-pointer flow
akhil9tiet Oct 8, 2026
63d5a4f
Merge branch 'main' into fix/1015-parse-error-exit-code
akhil9tiet Oct 8, 2026
e376c97
Merge branch 'main' into fix/1015-parse-error-exit-code
zateutsch Oct 9, 2026
2bb0e69
Merge branch 'main' into fix/1015-parse-error-exit-code
nmetulev Oct 9, 2026
79018fd
fix: add missing await in async lambda
akhil9tiet Oct 9, 2026
69043b7
fix: add missing await in async lambda
akhil9tiet Oct 9, 2026
49b3e1e
fix: add missing await in async lambda
akhil9tiet Oct 9, 2026
612074b
Merge branch 'main' into fix/1015-parse-error-exit-code
nmetulev Oct 9, 2026
c32e12c
fix: await InvokeWithHelpPointerAsync to fix CS4016
akhil9tiet Oct 9, 2026
378e707
Merge branch 'main' into fix/1015-parse-error-exit-code
nmetulev Oct 9, 2026
1415191
Merge branch 'main' into fix/1015-parse-error-exit-code
zateutsch Oct 10, 2026
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
10 changes: 9 additions & 1 deletion src/winapp-CLI/WinApp.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,15 @@ internal static async Task<int> Main(string[] args)
CancellationToken.None);
}

return parsedArgs.InvokeAsync();
// Parse errors must exit non-zero (issue #1015). InvokeAsync displays
// the error and help text, but return 1 explicitly so scripts and
// agents don't treat a rejected command line as success.
var invokeExitCode = await parsedArgs.InvokeAsync();
Comment thread
akhil9tiet marked this conversation as resolved.
if (parsedArgs.Errors.Count > 0 && invokeExitCode == 0)
{
return 1;
}
Comment thread
akhil9tiet marked this conversation as resolved.
return invokeExitCode;
});
}

Expand Down
Loading