Skip to content

Commit 00f5802

Browse files
committed
EIM-134 fixed path for searching for prerequisities on macos
1 parent ff7bc2f commit 00f5802

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src-tauri/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use serde_json::{json, Value};
1212
use std::fs::metadata;
1313
use std::process::Command;
1414
use std::{
15+
env,
1516
fs::{self, File},
1617
io::Read,
1718
path::{Path, PathBuf},
@@ -1273,6 +1274,11 @@ use tauri::Emitter;
12731274

12741275
#[cfg_attr(mobile, tauri::mobile_entry_point)]
12751276
pub fn run() {
1277+
// this is here because macos bundled .app does not inherit path
1278+
#[cfg(target_os = "macos")]
1279+
{
1280+
env::set_var("PATH", "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/opt/local/sbin");
1281+
}
12761282
let log_dir = idf_im_lib::get_log_directory().unwrap_or_else(|| {
12771283
error!("Failed to get log directory.");
12781284
PathBuf::from("")

0 commit comments

Comments
 (0)