From 5f7ad81b9481ff2e0472737110de7ae2b8eda319 Mon Sep 17 00:00:00 2001 From: Francesco Paolo Severino Date: Fri, 29 Aug 2025 12:34:10 +0200 Subject: [PATCH] Try using `readpassphrase` on Linux --- Sources/ConsoleKit/Terminal/Terminal.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/ConsoleKit/Terminal/Terminal.swift b/Sources/ConsoleKit/Terminal/Terminal.swift index 048f793..da42e43 100644 --- a/Sources/ConsoleKit/Terminal/Terminal.swift +++ b/Sources/ConsoleKit/Terminal/Terminal.swift @@ -68,12 +68,12 @@ public final class Terminal: Console, Sendable { #if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || os(Android) // swift-format-ignore func plat_readpassphrase(into buf: UnsafeMutableBufferPointer) -> Int { - #if canImport(Darwin) + //#if canImport(Darwin) let rpp = readpassphrase - #else - let rpp = linux_readpassphrase - let RPP_REQUIRE_TTY = 0 as Int32 - #endif + //#else + //let rpp = linux_readpassphrase + //let RPP_REQUIRE_TTY = 0 as Int32 + //#endif while rpp("", buf.baseAddress!, buf.count, RPP_REQUIRE_TTY) == nil { guard errno == EINTR else { return 0 }