From cb97c2b0d39b38e1ae4f424a62503717495fa36c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 31 Dec 2020 18:39:09 +0000 Subject: [PATCH] azureblob: fix crash on startup This was introduced by accidental code deletion in 08b9ede2173fb34f azureblob: add support for managed identities --- backend/azureblob/azureblob.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go index 8be08eb27..ff055b029 100644 --- a/backend/azureblob/azureblob.go +++ b/backend/azureblob/azureblob.go @@ -648,6 +648,11 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e if err != nil { return nil, errors.Wrapf(err, "Failed to parse credentials") } + + u, err = url.Parse(fmt.Sprintf("https://%s.%s", opt.Account, opt.Endpoint)) + if err != nil { + return nil, errors.Wrap(err, "failed to make azure storage url from account and endpoint") + } pipeline := f.newPipeline(credential, azblob.PipelineOptions{Retry: azblob.RetryOptions{TryTimeout: maxTryTimeout}}) serviceURL = azblob.NewServiceURL(*u, pipeline) case opt.SASURL != "":