Bug fix: Remove trail newline from secrets

- Fix #330
This commit is contained in:
Quentin McGaw
2020-12-31 02:03:51 +00:00
parent ae1f91a997
commit 8f862b3df7

View File

@@ -55,6 +55,7 @@ func (r *reader) getFromEnvOrSecretFile(envKey string, compulsory bool, retroKey
}
value = string(b)
value = strings.TrimSuffix(value, "\n")
if compulsory && len(value) == 0 {
return "", ErrSecretFileIsEmpty
}