File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -502,6 +502,20 @@ pub fn create_command_with_env(program: &str) -> Command {
502502 }
503503 }
504504 }
505+
506+ // Add Homebrew support if the program is in a Homebrew directory
507+ if program. contains ( "/homebrew/" ) || program. contains ( "/opt/homebrew/" ) {
508+ if let Some ( program_dir) = std:: path:: Path :: new ( program) . parent ( ) {
509+ // Ensure the Homebrew bin directory is in PATH
510+ let current_path = std:: env:: var ( "PATH" ) . unwrap_or_default ( ) ;
511+ let homebrew_bin_str = program_dir. to_string_lossy ( ) ;
512+ if !current_path. contains ( & homebrew_bin_str. as_ref ( ) ) {
513+ let new_path = format ! ( "{}:{}" , homebrew_bin_str, current_path) ;
514+ debug ! ( "Adding Homebrew bin directory to PATH: {}" , homebrew_bin_str) ;
515+ cmd. env ( "PATH" , new_path) ;
516+ }
517+ }
518+ }
505519
506520 cmd
507521}
Original file line number Diff line number Diff line change @@ -262,6 +262,19 @@ fn create_command_with_env(program: &str) -> Command {
262262 }
263263 }
264264 }
265+
266+ // Add Homebrew support if the program is in a Homebrew directory
267+ if program. contains ( "/homebrew/" ) || program. contains ( "/opt/homebrew/" ) {
268+ if let Some ( program_dir) = std:: path:: Path :: new ( program) . parent ( ) {
269+ let current_path = std:: env:: var ( "PATH" ) . unwrap_or_default ( ) ;
270+ let homebrew_bin_str = program_dir. to_string_lossy ( ) ;
271+ if !current_path. contains ( & homebrew_bin_str. as_ref ( ) ) {
272+ let new_path = format ! ( "{}:{}" , homebrew_bin_str, current_path) ;
273+ log:: debug!( "Adding Homebrew bin directory to PATH: {}" , homebrew_bin_str) ;
274+ tokio_cmd. env ( "PATH" , new_path) ;
275+ }
276+ }
277+ }
265278
266279 tokio_cmd
267280}
Original file line number Diff line number Diff line change @@ -1175,7 +1175,6 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
11751175 initial = { { opacity : 0 , y : 8 } }
11761176 animate = { { opacity : 1 , y : 0 } }
11771177 exit = { { opacity : 0 , y : - 8 } }
1178- transition = { { duration : 0.15 } }
11791178 transition = { { duration : 0.3 } }
11801179 className = "absolute inset-x-4 pb-4"
11811180 style = { {
@@ -1229,7 +1228,6 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
12291228 className = "fixed inset-0 z-50 bg-background"
12301229 initial = { { opacity : 0 , y : 8 } }
12311230 animate = { { opacity : 1 , y : 0 } }
1232- transition = { { duration : 0.15 } }
12331231 exit = { { opacity : 0 } }
12341232 transition = { { duration : 0.2 } }
12351233 >
You can’t perform that action at this time.
0 commit comments