remote: Upload bundled remote server binary to hosts without one
This commit is contained in:
1 parent
baf7acb0bc
commit
2abcfff462
2 files changed
+16
No files matched your search
@@ -274,6 +274,21 @@ async fn build_remote_server_from_source(
|
||||
log::warn!("ZED_BUILD_REMOTE_SERVER is disabled, but no server binary exists on the server")
|
||||
}
|
||||
|
||||
// Bundles ship a prebuilt remote server next to the editor binary so installs without a
|
||||
// zed checkout can still provision remote hosts. The .gz suffix makes the remote-side
|
||||
// extract step gunzip it.
|
||||
let bundled_remote_server = std::env::current_exe()
|
||||
.ok()
|
||||
.and_then(|exe| exe.parent().map(|dir| dir.join("zed-remote-server.gz")))
|
||||
.filter(|path| path.is_file());
|
||||
if let Some(bundled_remote_server) = bundled_remote_server {
|
||||
if binary_exists_on_server {
|
||||
return Ok(None);
|
||||
}
|
||||
log::info!("uploading bundled remote server binary");
|
||||
return Ok(Some(bundled_remote_server));
|
||||
}
|
||||
|
||||
async fn run_cmd(command: &mut Command) -> Result<()> {
|
||||
let output = command
|
||||
.kill_on_drop(true)
|
||||
|
||||
Reference in new issue
Block a user