mirror of
https://github.com/restic/restic.git
synced 2025-08-23 17:55:17 +00:00
Error if AZURE_ACCOUNT_NAME not set
This commit is contained in:
@@ -62,6 +62,11 @@ func open(cfg Config, rt http.RoundTripper) (*Backend, error) {
|
||||
} else {
|
||||
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)
|
||||
opts := &azContainer.ClientOptions{
|
||||
ClientOptions: azcore.ClientOptions{
|
||||
|
Reference in New Issue
Block a user