mirror of
https://github.com/octoleo/restic.git
synced 2025-02-06 22:08:29 +00:00
Fix handling of empty cacert environment variable
This resulted in a "empty filename for root certificate supplied" error.
This commit is contained in:
parent
789fec3da7
commit
1ce599d2ae
@ -151,7 +151,9 @@ func init() {
|
||||
globalOptions.PasswordFile = os.Getenv("RESTIC_PASSWORD_FILE")
|
||||
globalOptions.KeyHint = os.Getenv("RESTIC_KEY_HINT")
|
||||
globalOptions.PasswordCommand = os.Getenv("RESTIC_PASSWORD_COMMAND")
|
||||
globalOptions.RootCertFilenames = strings.Split(os.Getenv("RESTIC_CACERT"), ",")
|
||||
if os.Getenv("RESTIC_CACERT") != "" {
|
||||
globalOptions.RootCertFilenames = strings.Split(os.Getenv("RESTIC_CACERT"), ",")
|
||||
}
|
||||
globalOptions.TLSClientCertKeyFilename = os.Getenv("RESTIC_TLS_CLIENT_CERT")
|
||||
comp := os.Getenv("RESTIC_COMPRESSION")
|
||||
if comp != "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user