File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 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() {
8585 let auth = build_auth ( & reference, & cli) ;
8686
8787 let client_config = build_client_config ( & cli) ;
88- let mut client = Client :: new ( client_config) ;
88+ let client = Client :: new ( client_config) ;
8989
9090 let ( manifest, _) = client
9191 . pull_manifest ( & reference, & auth)
Original file line number Diff line number Diff line change @@ -534,6 +534,8 @@ impl Client {
534534 authentication : & RegistryAuth ,
535535 operation : RegistryOperation ,
536536 ) -> Result < Option < String > > {
537+ self . store_auth_if_needed ( image. resolve_registry ( ) , authentication)
538+ . await ;
537539 // preserve old caching behavior
538540 match self . _auth ( image, authentication, operation) . await {
539541 Ok ( Some ( RegistryTokenType :: Bearer ( token) ) ) => {
@@ -1802,6 +1804,14 @@ mod test {
18021804 . as_str ( )
18031805 . to_string ( ) ;
18041806
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+
18051815 client
18061816 . tokens
18071817 . insert (
You can’t perform that action at this time.
0 commit comments