Skip to content

Commit

Permalink
fix: panic when cloud config is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Apr 3, 2024
1 parent 223bcde commit 021d1da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/azurefile/azurefile.go
Expand Up @@ -1080,8 +1080,8 @@ func (d *Driver) GetTotalAccountQuota(ctx context.Context, subsID, resourceGroup

// RemoveStorageAccountTag remove tag from storage account
func (d *Driver) RemoveStorageAccountTag(ctx context.Context, subsID, resourceGroup, account, key string) error {
if d.cloud == nil {
return fmt.Errorf("cloud is nil")
if d.cloud == nil || d.cloud.StorageAccountClient == nil {
return fmt.Errorf("cloud or StorageAccountClient is nil")
}
// search in cache first
cache, err := d.skipMatchingTagCache.Get(account, azcache.CacheReadTypeDefault)
Expand Down

0 comments on commit 021d1da

Please sign in to comment.