From 4ce42e3c08a974baabcee2fedf27ece213d190df Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Tue, 20 Aug 2024 12:15:41 -0500 Subject: [PATCH 1/2] Repo dispatch version bump --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fef8174eb..7c5a34c4f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -121,7 +121,7 @@ jobs: env: REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} if: env.REPO_ACCESS_TOKEN - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 with: repository: KSP-CKAN/CKAN-ModInstaller event-type: deploy From 1c4813d2a2c5c3b7bca349fd4d120f0c04a2585e Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Tue, 20 Aug 2024 12:16:18 -0500 Subject: [PATCH 2/2] Set headless mode automatically --- Cmdline/Options.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Cmdline/Options.cs b/Cmdline/Options.cs index 86e459357..53080fb09 100644 --- a/Cmdline/Options.cs +++ b/Cmdline/Options.cs @@ -262,6 +262,18 @@ public virtual int Handle(GameInstanceManager manager, IUser user) log.Info("Verbose logging enabled"); } + // Auto-detect whether IO device is interactive + if (!Headless && (Console.IsInputRedirected || Console.IsOutputRedirected)) + { + log.InfoFormat("Setting headless mode ({0})", + Console.IsInputRedirected + ? Console.IsOutputRedirected + ? "I/O redirected" + : "input redirected" + : "output redirected"); + Headless = true; + } + // Assign user-agent string if user has given us one if (NetUserAgent != null) {