Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 4 additions & 3 deletions Sources/ConsoleKitTerminal/Terminal/Console.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/ConsoleKitTests/ReadPassphraseTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if (os(Linux) || os(Android)) || (os(macOS) && DEBUG)
@testable import ConsoleKit
@testable import ConsoleKitTerminal
import Testing

#if canImport(Darwin)
Expand Down
Loading