mirror of
https://github.com/restic/restic.git
synced 2024-12-21 23:33:03 +00:00
Error if AZURE_ACCOUNT_NAME not set
This commit is contained in:
parent
1133498ef8
commit
dfbd4fb983
1 changed files with 5 additions and 0 deletions
|
@ -62,6 +62,11 @@ func open(cfg Config, rt http.RoundTripper) (*Backend, error) {
|
||||||
} else {
|
} else {
|
||||||
endpointSuffix = "core.windows.net"
|
endpointSuffix = "core.windows.net"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.AccountName == "" {
|
||||||
|
return nil, errors.Fatalf("unable to open Azure backend: Account name ($AZURE_ACCOUNT_NAME) is empty")
|
||||||
|
}
|
||||||
|
|
||||||
url := fmt.Sprintf("https://%s.blob.%s/%s", cfg.AccountName, endpointSuffix, cfg.Container)
|
url := fmt.Sprintf("https://%s.blob.%s/%s", cfg.AccountName, endpointSuffix, cfg.Container)
|
||||||
opts := &azContainer.ClientOptions{
|
opts := &azContainer.ClientOptions{
|
||||||
ClientOptions: azcore.ClientOptions{
|
ClientOptions: azcore.ClientOptions{
|
||||||
|
|
Loading…
Reference in a new issue