TryDeleteBlob

Builds are currently failing because we try to delete blobs that don't exist. This change logs & ignores the exception.
This commit is contained in:
Piotr Puszkiewicz 2016-05-01 19:54:06 -07:00
parent 011b5590d7
commit d9d6cbd6f1
2 changed files with 17 additions and 1 deletions

View file

@ -139,6 +139,22 @@ namespace Microsoft.DotNet.Cli.Build
}
}
public bool TryDeleteBlob(string path)
{
try
{
DeleteBlob(path);
return true;
}
catch (Exception e)
{
Console.WriteLine($"Deleting blob {path} failed with \r\n{e.Message}");
return false;
}
}
public void DeleteBlob(string path)
{
_blobContainer.GetBlockBlobReference(path).DeleteAsync().Wait();