Changing the lzma generation to first trying to download it from blob. If that fails, generate it. And if we generate it and we are uploading things to azure, upload it as well.
This commit is contained in:
parent
ccc4968bc3
commit
087852b1b8
3 changed files with 63 additions and 17 deletions
|
@ -1,6 +1,7 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Build.Framework;
|
||||
|
@ -35,7 +36,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
using (var outStream = File.Create(DestinationPath))
|
||||
{
|
||||
getTask.Result.CopyTo(outStream);
|
||||
try
|
||||
{
|
||||
getTask.Result.CopyTo(outStream);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
File.Delete(DestinationPath);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue