Skip to content

Commit c2d65e2

Browse files
committed
chore: strip leading and trailing whitespace characters from credential values
Signed-off-by: Taylor Price <[email protected]>
1 parent 8f7d28f commit c2d65e2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/credentials/credential.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ func (c Credential) IsExpired() bool {
3535
}
3636

3737
func (c Credential) toDockerAuthConfig() (types.AuthConfig, error) {
38+
for k, v := range c.Env {
39+
c.Env[k] = strings.TrimSpace(v)
40+
}
3841
cred, err := json.Marshal(c)
3942
if err != nil {
4043
return types.AuthConfig{}, err

0 commit comments

Comments
 (0)