mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 08:16:25 +00:00
renamed env
This commit is contained in:
parent
02a8e461d4
commit
048a5ffed8
@ -89,7 +89,8 @@ func (b Backend) getKey() (string, error) {
|
|||||||
if b.Key != "" {
|
if b.Key != "" {
|
||||||
return b.Key, nil
|
return b.Key, nil
|
||||||
}
|
}
|
||||||
if key, found := os.LookupEnv("AUTORESTIC_KEY_" + strings.ToUpper(b.name)); found {
|
keyName := "AUTORESTIC_" + strings.ToUpper(b.name) + "_KEY"
|
||||||
|
if key, found := os.LookupEnv(keyName); found {
|
||||||
return key, nil
|
return key, nil
|
||||||
}
|
}
|
||||||
return "", fmt.Errorf("no key found for backend \"%s\"", b.name)
|
return "", fmt.Errorf("no key found for backend \"%s\"", b.name)
|
||||||
|
Loading…
Reference in New Issue
Block a user