@@ -86,7 +86,7 @@ private void ExecuteCore()
86
86
LoggedQueryParameters = { "api-version" } ,
87
87
IsAccountIdentifierLoggingEnabled = true
88
88
} ,
89
- ManagedIdentityClientId = clientId } ;
89
+ ManagedIdentityClientId = ClientId } ;
90
90
Log . LogMessage ( $ "Trying to use managed identity with client id: { ClientId } ") ;
91
91
}
92
92
@@ -97,13 +97,15 @@ private void ExecuteCore()
97
97
credential ) ;
98
98
99
99
var containerClient = blobServiceClient . GetBlobContainerClient ( BlobContainer ) ;
100
+ Pageable < BlobItem > blobs ;
100
101
try
101
102
{
102
- Pageable < BlobItem > blobs = containerClient . GetBlobs ( prefix : RepoName + "/" ) ;
103
+ blobs = containerClient . GetBlobs ( prefix : RepoName + "/" ) ;
103
104
}
104
105
catch ( AuthenticationFailedException e )
105
106
{
106
- Fatal ( $ "*** BLOB ENUMERATION FAILED: { e . Message } ") ;
107
+ Log . LogError ( $ "*** BLOB ENUMERATION FAILED: { e . Message } ") ;
108
+ return ;
107
109
}
108
110
BlobItem newest = blobs . OrderByDescending ( b => b . Name ) . FirstOrDefault ( ) ;
109
111
if ( newest == null )
@@ -118,14 +120,15 @@ private void ExecuteCore()
118
120
try
119
121
{
120
122
using Stream fileStream = blobClient . OpenRead ( ) ;
123
+ using var input = new GZipInputStream ( fileStream ) ;
124
+ using var archive = TarArchive . CreateInputTarArchive ( input , Encoding . UTF8 ) ;
125
+ archive . ExtractContents ( OutputDirectory , true ) ; // would like this to be false, but SharpZipLib has a bug in 1.3.3
121
126
}
122
127
catch ( AuthenticationFailedException e )
123
128
{
124
- Fatal ( $ "*** STREAM READ FAILED: { e . Message } ") ;
129
+ Log . LogError ( $ "*** STREAM READ FAILED: { e . Message } ") ;
130
+ return ;
125
131
}
126
- using var input = new GZipInputStream ( fileStream ) ;
127
- using var archive = TarArchive . CreateInputTarArchive ( input , Encoding . UTF8 ) ;
128
- archive . ExtractContents ( OutputDirectory , true ) ; // would like this to be false, but SharpZipLib has a bug in 1.3.3
129
132
}
130
133
}
131
134
}
0 commit comments