Skip to content

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

fix: deno issue

Louis Beaumontac5a66fd83c4
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 67c43aef1..e0172d674 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.4.4"
+version = "0.4.5"
description = ""
authors = ["you"]
license = ""
diff --git a/screenpipe-app-tauri/src-tauri/src/sidecar.rs b/screenpipe-app-tauri/src-tauri/src/sidecar.rs
index 8ca907118..40fc51aa1 100644
--- a/screenpipe-app-tauri/src-tauri/src/sidecar.rs
+++ b/screenpipe-app-tauri/src-tauri/src/sidecar.rs
@@ -256,6 +256,22 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {
// args.push("--debug");
+ // macos /Applications/screenpipe.app/Contents/MacOS/
+ // linux /usr/local/bin
+ // windows %LOCALAPPDATA%\\screenpipe
+ let screenpipe_path = app
+ .path()
+ .local_data_dir()
+ .unwrap_or_default()
+ .join("screenpipe");
+ let path_to_sidecars = if cfg!(windows) {
+ screenpipe_path.to_str().unwrap_or_default()
+ } else if cfg!(target_os = "macos") {
+ "/Applications/screenpipe.app/Contents/MacOS/"
+ } else {
+ "/usr/local/bin"
+ };
+
if cfg!(windows) {
let exe_dir = env::current_exe()
.expect("Failed to get current executable path")
@@ -273,7 +289,7 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {
c = c.env("HF_ENDPOINT", "https://hf-mirror.com");
}
- c = c.env("PATH", app.path().resource_dir().unwrap());
+ c = c.env("PATH", path_to_sidecars);
let c = c.args(&args);
@@ -294,7 +310,7 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {
}
// pass the sidecars PATH to the screenpipe process
- command = command.env("PATH", app.path().resource_dir().unwrap());
+ command = command.env("PATH", path_to_sidecars);
let command = command.args(&args);