Prefer runtime env variable VK_SHARED_API_BASE (#1340)

Enables testing a pre-release with a dev version of remote.
This commit is contained in:
Solomon
2025-11-19 18:30:03 +00:00
committed by GitHub
parent 6e5cb34f7e
commit 9a5323b3b4

View File

@@ -132,9 +132,9 @@ impl Deployment for LocalDeployment {
let profile_cache = Arc::new(RwLock::new(None));
let auth_context = AuthContext::new(oauth_credentials.clone(), profile_cache.clone());
let api_base = option_env!("VK_SHARED_API_BASE")
.map(|s| s.to_string())
.or_else(|| std::env::var("VK_SHARED_API_BASE").ok());
let api_base = std::env::var("VK_SHARED_API_BASE")
.ok()
.or_else(|| option_env!("VK_SHARED_API_BASE").map(|s| s.to_string()));
let remote_client = match api_base {
Some(url) => match RemoteClient::new(&url, auth_context.clone()) {