tart login: read whole stdin contents instead of just a line (#170)

This commit is contained in:
Nikolay Edigaryev
2022-08-02 16:52:35 +03:00
committed by GitHub
parent 7d16516b6a
commit b83bce4544
+3 -1
View File
@@ -30,7 +30,9 @@ struct Login: AsyncParsableCommand {
if let username = username {
user = username
password = readLine()!
let passwordData = FileHandle.standardInput.readDataToEndOfFile()
password = String(decoding: passwordData, as: UTF8.self)
} else {
(user, password) = try StdinCredentials.retrieve()
}