mirror of https://github.com/cirruslabs/tart.git
tart login: read whole stdin contents instead of just a line (#170)
This commit is contained in:
parent
7d16516b6a
commit
b83bce4544
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue