mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-13 05:42:59 +00:00
Ignore empty ZED_IMPERSONATE env var
This commit is contained in:
parent
412535420b
commit
9352c4e076
1 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,9 @@ use zrpc::{
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref ZED_SERVER_URL: String =
|
static ref ZED_SERVER_URL: String =
|
||||||
std::env::var("ZED_SERVER_URL").unwrap_or("https://zed.dev:443".to_string());
|
std::env::var("ZED_SERVER_URL").unwrap_or("https://zed.dev:443".to_string());
|
||||||
static ref IMPERSONATE_LOGIN: Option<String> = std::env::var("ZED_IMPERSONATE").ok();
|
static ref IMPERSONATE_LOGIN: Option<String> = std::env::var("ZED_IMPERSONATE")
|
||||||
|
.ok()
|
||||||
|
.and_then(|s| if s.is_empty() { None } else { Some(s) });
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Client {
|
pub struct Client {
|
||||||
|
|
Loading…
Reference in a new issue