From 500becd3f8ddaa761f2371f052e94a91d9ae7a82 Mon Sep 17 00:00:00 2001 From: Simon Popugaev Date: Wed, 31 Jan 2024 19:43:48 +0300 Subject: [PATCH] rename golem url env var --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3c33fdc..17b0cca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -186,8 +186,10 @@ fn main() -> Result<(), Box> { } async fn async_main(cmd: GolemCommand) -> Result<(), Box> { - let url_str = - std::env::var("GOLEM_BASE_URL").unwrap_or("https://release.api.golem.cloud/".to_string()); + let url_str = std::env::var("GOLEM_CLOUD_BASE_URL") + .ok() + .or_else(|| std::env::var("GOLEM_BASE_URL").ok()) + .unwrap_or("https://release.api.golem.cloud/".to_string()); let gateway_url_str = std::env::var("GOLEM_GATEWAY_BASE_URL").unwrap_or(url_str.clone()); let url = Url::parse(&url_str).unwrap(); let gateway_url = Url::parse(&gateway_url_str).unwrap();