diff --git a/internal/util/credentials.go b/internal/util/credentials.go index ad8fa6d6e..b189c6c9d 100644 --- a/internal/util/credentials.go +++ b/internal/util/credentials.go @@ -54,7 +54,7 @@ func storeKey(key string) (string, error) { } }() - if _, err = tmpfile.Write([]byte(key)); err != nil { + if _, err = tmpfile.WriteString(key); err != nil { return "", fmt.Errorf("error writing key to temporary keyfile: %w", err) }