Skip to content

Commit 5af0a1a

Browse files
committed
speed of thought
1 parent e676030 commit 5af0a1a

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flash"
3-
version = "0.0.4"
3+
version = "0.0.5"
44
edition = "2024"
55
description = "Shell parser, formatter, and interpreter with Bash support"
66
license = "GPL-3.0-or-later"

src/interpreter.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,19 @@ impl Interpreter {
14121412
variables.insert("PWD".to_string(), current_dir.to_string_lossy().to_string());
14131413
}
14141414

1415+
// Add /opt/homebrew/bin to PATH on macOS
1416+
#[cfg(target_os = "macos")]
1417+
{
1418+
if let Some(current_path) = variables.get("PATH") {
1419+
if !current_path.contains("/opt/homebrew/bin") {
1420+
let new_path = format!("/opt/homebrew/bin:{}", current_path);
1421+
variables.insert("PATH".to_string(), new_path);
1422+
}
1423+
} else {
1424+
variables.insert("PATH".to_string(), "/opt/homebrew/bin".to_string());
1425+
}
1426+
}
1427+
14151428
let home_dir = env::var("HOME").ok();
14161429

14171430
let history_file = home_dir

0 commit comments

Comments
 (0)