From 627d3942fae6abf139347ad5c4acf8ada5972431 Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Mon, 19 Oct 2026 08:56:12 -0500 Subject: [PATCH 1/3] Address colored output being broken due to new build system (v4) --- Sources/ConsoleKitTerminal/Terminal/Console.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Sources/ConsoleKitTerminal/Terminal/Console.swift b/Sources/ConsoleKitTerminal/Terminal/Console.swift index f961244..0d45cfc 100644 --- a/Sources/ConsoleKitTerminal/Terminal/Console.swift +++ b/Sources/ConsoleKitTerminal/Terminal/Console.swift @@ -97,9 +97,10 @@ public protocol Console: AnyObject, Sendable { extension Console { public var supportsANSICommands: Bool { - #if Xcode - // Xcode output does not support ANSI commands - return false + #if canImport(Darwin) + // We cannot check `#if Xcode` anymore due to https://github.com/swiftlang/swift-package-manager/issues/10675 + // This is a pretty awful hack, but at least it works. + return (getenv("TERM").map { strncmp($0, "dumb", 4) } ?? 1) != 0 #elseif os(Windows) return _isatty(_fileno(stdout)) > 0 #else From 52f5bb53ad850b542d4a926185116ea42c6756aa Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Mon, 19 Oct 2026 09:17:38 -0500 Subject: [PATCH 2/3] Attempt to fix CI --- Tests/ConsoleKitTests/ReadPassphraseTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/ConsoleKitTests/ReadPassphraseTests.swift b/Tests/ConsoleKitTests/ReadPassphraseTests.swift index eab5909..92bc68b 100644 --- a/Tests/ConsoleKitTests/ReadPassphraseTests.swift +++ b/Tests/ConsoleKitTests/ReadPassphraseTests.swift @@ -1,5 +1,5 @@ #if (os(Linux) || os(Android)) || (os(macOS) && DEBUG) -@testable import ConsoleKit +@testable import ConsoleKitTerminal import Testing #if canImport(Darwin) From d5986bb05f2c7638c25b8ebe6469cdbe6132375a Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Mon, 19 Oct 2026 09:22:20 -0500 Subject: [PATCH 3/3] Fix integration test for v4 --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e6a91c..866fd38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,9 +31,9 @@ jobs: runs-on: ubuntu-latest container: swift:noble steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: { path: console-kit } - - uses: actions/checkout@v6 - with: { repository: 'vapor/vapor', path: vapor } + - uses: actions/checkout@v7 + with: { repository: 'vapor/vapor', ref: 'vapor4', path: vapor } - run: swift package --package-path vapor edit console-kit --path console-kit - run: swift test --package-path vapor