File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ pub async fn main() {
85
85
let auth = build_auth ( & reference, & cli) ;
86
86
87
87
let client_config = build_client_config ( & cli) ;
88
- let mut client = Client :: new ( client_config) ;
88
+ let client = Client :: new ( client_config) ;
89
89
90
90
let ( manifest, _) = client
91
91
. pull_manifest ( & reference, & auth)
Original file line number Diff line number Diff line change @@ -534,6 +534,8 @@ impl Client {
534
534
authentication : & RegistryAuth ,
535
535
operation : RegistryOperation ,
536
536
) -> Result < Option < String > > {
537
+ self . store_auth_if_needed ( image. resolve_registry ( ) , authentication)
538
+ . await ;
537
539
// preserve old caching behavior
538
540
match self . _auth ( image, authentication, operation) . await {
539
541
Ok ( Some ( RegistryTokenType :: Bearer ( token) ) ) => {
@@ -1802,6 +1804,14 @@ mod test {
1802
1804
. as_str ( )
1803
1805
. to_string ( ) ;
1804
1806
1807
+ // we have to have it in the stored auth so we'll get to the token cache check.
1808
+ client
1809
+ . store_auth (
1810
+ & Reference :: try_from ( HELLO_IMAGE_TAG ) ?. resolve_registry ( ) ,
1811
+ RegistryAuth :: Anonymous ,
1812
+ )
1813
+ . await ;
1814
+
1805
1815
client
1806
1816
. tokens
1807
1817
. insert (
You can’t perform that action at this time.
0 commit comments