From 5e9593fcb400d89be90cfd08069b9be4581a2bdb Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Mon, 17 Apr 2023 14:52:02 -0500 Subject: [PATCH] Patch to fix command-line-api to work with latest SDK (#16136) --- ...y-cast-default-for-Task.Delay-method.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/SourceBuild/patches/command-line-api/0003-Explicitly-cast-default-for-Task.Delay-method.patch diff --git a/src/SourceBuild/patches/command-line-api/0003-Explicitly-cast-default-for-Task.Delay-method.patch b/src/SourceBuild/patches/command-line-api/0003-Explicitly-cast-default-for-Task.Delay-method.patch new file mode 100644 index 000000000..f71f4b885 --- /dev/null +++ b/src/SourceBuild/patches/command-line-api/0003-Explicitly-cast-default-for-Task.Delay-method.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matt Thalman +Date: Mon, 17 Apr 2023 12:26:51 -0500 +Subject: [PATCH] Explicitly cast default for Task.Delay method + +Backport: Not needed since this code is removed in latest version of command-line-api +--- + src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs b/src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs +index 0fb30887..cd59971d 100644 +--- a/src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs ++++ b/src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs +@@ -107,7 +107,7 @@ namespace System.CommandLine + if (timeout! > TimeSpan.Zero) + { + Task +- .Delay(timeout.Value, default) ++ .Delay(timeout.Value, (CancellationToken)default) + .ContinueWith(t => + { + // Prevent our ProcessExit from intervene and block the exit