mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 02:37:21 +00:00
Fix per-env settings override (#7114)
Due to a misplaced .trim(), the RELEASE_CHANNEL_NAME included the trailing newline. Release Notes: - N/A
This commit is contained in:
parent
a5826e22f5
commit
871b8525b4
1 changed files with 3 additions and 3 deletions
|
@ -6,14 +6,14 @@ use std::env;
|
||||||
pub static RELEASE_CHANNEL_NAME: Lazy<String> = if cfg!(debug_assertions) {
|
pub static RELEASE_CHANNEL_NAME: Lazy<String> = if cfg!(debug_assertions) {
|
||||||
Lazy::new(|| {
|
Lazy::new(|| {
|
||||||
env::var("ZED_RELEASE_CHANNEL")
|
env::var("ZED_RELEASE_CHANNEL")
|
||||||
.unwrap_or_else(|_| include_str!("../../zed/RELEASE_CHANNEL").to_string())
|
.unwrap_or_else(|_| include_str!("../../zed/RELEASE_CHANNEL").trim().to_string())
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Lazy::new(|| include_str!("../../zed/RELEASE_CHANNEL").to_string())
|
Lazy::new(|| include_str!("../../zed/RELEASE_CHANNEL").trim().to_string())
|
||||||
};
|
};
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub static RELEASE_CHANNEL: Lazy<ReleaseChannel> =
|
pub static RELEASE_CHANNEL: Lazy<ReleaseChannel> =
|
||||||
Lazy::new(|| match RELEASE_CHANNEL_NAME.as_str().trim() {
|
Lazy::new(|| match RELEASE_CHANNEL_NAME.as_str() {
|
||||||
"dev" => ReleaseChannel::Dev,
|
"dev" => ReleaseChannel::Dev,
|
||||||
"nightly" => ReleaseChannel::Nightly,
|
"nightly" => ReleaseChannel::Nightly,
|
||||||
"preview" => ReleaseChannel::Preview,
|
"preview" => ReleaseChannel::Preview,
|
||||||
|
|
Loading…
Reference in a new issue