mirror of
https://github.com/Luzifer/vault-openvpn.git
synced 2024-12-25 14:21:21 +00:00
Fixes error when '~/.vault-token' contains a trailing newline
First of all, thanks for the great tool!
This PR fixes an error encountered by one of our developers which occured when they had manually created the `~/.vault-token` file, and their editor had added a trailing newline. The error comes from the following line: https://github.com/hashicorp/vault/blob/master/api/client.go#L747
The official vault client was patched for this in f8c657a80a
, after issues https://github.com/hashicorp/vault/issues/1774 and https://github.com/hashicorp/vault/issues/1902.
This commit is contained in:
parent
4d1d07b3c3
commit
66ccd94069
1 changed files with 1 additions and 1 deletions
|
@ -116,5 +116,5 @@ func vaultTokenFromDisk() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
return string(data)
|
||||
return strings.TrimSpace(string(data))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue