mirror of https://github.com/cirruslabs/tart.git
tart login: trim newline characters at the end of --password-stdin (#486)
This commit is contained in:
parent
37ae7888e6
commit
6de31de6bf
|
|
@ -35,6 +35,9 @@ struct Login: AsyncParsableCommand {
|
|||
|
||||
let passwordData = FileHandle.standardInput.readDataToEndOfFile()
|
||||
password = String(decoding: passwordData, as: UTF8.self)
|
||||
|
||||
// Support "echo $PASSWORD | tart login --username $USERNAME --password-stdin $REGISTRY"
|
||||
password.trimSuffix { c in c.isNewline }
|
||||
} else {
|
||||
(user, password) = try StdinCredentials.retrieve()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue