We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 843a380 commit 4bbabf6Copy full SHA for 4bbabf6
src/AWS.Deploy.CLI/CommandReturnCodes.cs
@@ -34,5 +34,9 @@ public class CommandReturnCodes
34
/// using a TCP port that is already in use.
35
/// </summary>
36
public const int TCP_PORT_ERROR = -100;
37
+ /// <summary>
38
+ /// A command was canceled by a user.
39
+ /// </summary>
40
+ public const int USER_CANCEL = 130;
41
}
42
src/AWS.Deploy.CLI/Commands/CancellableAsyncCommand.cs
@@ -4,6 +4,7 @@
4
using System.Runtime.InteropServices;
5
using System.Threading;
6
using System.Threading.Tasks;
7
+using AWS.Deploy.CLI;
8
9
namespace Spectre.Console.Cli;
10
@@ -36,6 +37,8 @@ void onSignal(PosixSignalContext context)
{
context.Cancel = true;
cancellationSource.Cancel();
+
+ Environment.Exit(CommandReturnCodes.USER_CANCEL);
43
44
0 commit comments