Skip to content

Commit dbc8442

Browse files
authored
Return exit code of zero when no args are given (#145)
WinGet's validation currently doesn't like us returning an error code, return exit code of zero for now.
1 parent 4ab2bdb commit dbc8442

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/winapp-CLI/WinApp.Cli/Program.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ static async Task<int> Main(string[] args)
7676

7777
CommandCompletedEvent.Log(parseResult.CommandResult, returnCode);
7878

79+
if (args.Length == 0)
80+
{
81+
// Temporary special case: If no arguments are provided, return 0 to indicate success.
82+
// This is because winget's validation currently doesn't like us returning failure here.
83+
returnCode = 0;
84+
}
85+
7986
return returnCode;
8087
}
8188
catch (Exception ex)

0 commit comments

Comments
 (0)