From 94b85dbc681556709194d05d49b8aa926ea94e11 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Mon, 6 Sep 2021 14:08:44 +0100 Subject: [PATCH] app: return non-zero exit code on exception Return a non-zero program exit code when an unhandled exception is encountered at the top-level command line handling. --- src/shared/Microsoft.Git.CredentialManager/Application.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/Microsoft.Git.CredentialManager/Application.cs b/src/shared/Microsoft.Git.CredentialManager/Application.cs index abb5a8785..54313e64b 100644 --- a/src/shared/Microsoft.Git.CredentialManager/Application.cs +++ b/src/shared/Microsoft.Git.CredentialManager/Application.cs @@ -111,6 +111,8 @@ private void OnException(Exception ex, InvocationContext invocationContext) { WriteException(ex); } + + invocationContext.ResultCode = -1; } private bool WriteException(Exception ex)