From e5fa4f222a2b59309985c7d7fa2f576a4c97ed56 Mon Sep 17 00:00:00 2001 From: Michael-F-Bryan Date: Tue, 27 Jun 2023 11:01:40 +0800 Subject: [PATCH] Token lookups go through the registry getter instead of using the current registry --- lib/registry/src/wasmer_env.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/registry/src/wasmer_env.rs b/lib/registry/src/wasmer_env.rs index b3fcfea2fd9..110d434fdee 100644 --- a/lib/registry/src/wasmer_env.rs +++ b/lib/registry/src/wasmer_env.rs @@ -88,8 +88,10 @@ impl WasmerEnv { // Fall back to the config file let config = self.config().ok()?; - let login = config.registry.current_login()?; - Some(login.token.clone()) + let registry_endpoint = self.registry_endpoint().ok()?; + config + .registry + .get_login_token_for_registry(registry_endpoint.as_str()) } }