YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: run .exe shims directly instead of wrapping with bun on Windows
Louis Beaumont25c2e543e02e
diff --git a/.gitignore b/.gitignoreindex f79bb33b7..bab175dc1 100644--- a/.gitignore+++ b/.gitignore@@ -64,4 +64,6 @@ screenpipe-app-tauri/src-tauri/.next/.wrangler/+.playwright*+crates/screenpipe-audio/onnxruntime-win-x64-1.19.2.zipdiff --git a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs b/apps/screenpipe-app-tauri/src-tauri/src/pi.rsindex 4adfbe345..68e35fcb7 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/pi.rs@@ -25,15 +25,16 @@ static PI_INSTALL_DONE: AtomicBool = AtomicBool::new(false);/// On Windows, `.cmd` files cannot be spawned directly with `Command::new()` since/// Rust 1.77+ (CVE-2024-24576 fix). We must use `cmd.exe /C` to run them.-/// For `.exe` shims from `bun add -g`, run via bundled bun to ensure the JS-/// entrypoint resolves correctly (the shim alone fails with exit code 255 on-/// some Windows machines where bun isn't in PATH).+/// `.exe` shims (from `bun add -g`) are native executables — run them directly.+/// Only wrap non-exe paths (e.g. JS files) with bun.#[cfg(windows)]fn build_command_for_path(path: &str) -> Command {if path.ends_with(".cmd") || path.ends_with(".bat") {let mut cmd = Command::new("cmd.exe");cmd.args(["/C", path]);cmd+ } else if path.ends_with(".exe") {+ Command::new(path)} else if let Some(bun) = find_bun_executable() {let mut cmd = Command::new(bun);cmd.arg(path);@@ -63,6 +64,8 @@ fn build_async_command_for_path(path: &str) -> tokio::process::Command {let mut cmd = tokio::process::Command::new("cmd.exe");cmd.args(["/C", path]);cmd+ } else if path.ends_with(".exe") {+ tokio::process::Command::new(path)} else if let Some(bun) = find_bun_executable() {let mut cmd = tokio::process::Command::new(bun);cmd.arg(path);