windows: Fix supermaven (#16203)
Closes #16194 This PR introduces the following changes: 1. Updated the download process to retrieve the `.exe` file, as the API response indicates that the `.exe` file should be downloaded on Windows. > API response: "https://supermaven-public.s3.amazonaws.com/sm-agent/26/windows/amd64/sm-agent.exe" 2. Modified the startup behavior of supermaven to prevent the cmd window from appearing. Release Notes: - N/A
This commit is contained in:
parent
0eb96c72e3
commit
88a12b60a9
4 changed files with 20 additions and 5 deletions
|
@ -31,6 +31,9 @@ text.workspace = true
|
|||
ui.workspace = true
|
||||
util.workspace = true
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
windows.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
editor = { workspace = true, features = ["test-support"] }
|
||||
env_logger.workspace = true
|
||||
|
|
|
@ -260,14 +260,21 @@ impl SupermavenAgent {
|
|||
client: Arc<Client>,
|
||||
cx: &mut ModelContext<Supermaven>,
|
||||
) -> Result<Self> {
|
||||
let mut process = Command::new(&binary_path)
|
||||
let mut process = Command::new(&binary_path);
|
||||
process
|
||||
.arg("stdio")
|
||||
.stdin(Stdio::piped())
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped())
|
||||
.kill_on_drop(true)
|
||||
.spawn()
|
||||
.context("failed to start the binary")?;
|
||||
.kill_on_drop(true);
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
use smol::process::windows::CommandExt;
|
||||
process.creation_flags(windows::Win32::System::Threading::CREATE_NO_WINDOW.0);
|
||||
}
|
||||
|
||||
let mut process = process.spawn().context("failed to start the binary")?;
|
||||
|
||||
let stdin = process
|
||||
.stdin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue