Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

update: Add arch and os to release query parameters. (#6976)

Piotr Osiewicz9ef830e9bbaa
diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs
index 08e9e38dd50..5ce3316be83 100644
--- a/crates/auto_update/src/auto_update.rs
+++ b/crates/auto_update/src/auto_update.rs
@@ -18,7 +18,12 @@ use smol::io::AsyncReadExt;
use settings::{Settings, SettingsStore};
use smol::{fs::File, process::Command};
-use std::{ffi::OsString, sync::Arc, time::Duration};
+use std::{
+ env::consts::{ARCH, OS},
+ ffi::OsString,
+ sync::Arc,
+ time::Duration,
+};
use update_notification::UpdateNotification;
use util::channel::{AppCommitSha, ReleaseChannel};
use util::http::HttpClient;
@@ -249,7 +254,10 @@ impl AutoUpdater {
)
})?;
- let mut url_string = format!("{server_url}/api/releases/latest?asset=Zed.dmg");
+ let mut url_string = format!(
+ "{server_url}/api/releases/latest?asset=Zed.dmg&os={}&arch={}",
+ OS, ARCH
+ );
cx.update(|cx| {
if let Some(param) = cx
.try_global::<ReleaseChannel>()