@@ -12,7 +12,8 @@ import (
1212
1313// Builder helps construct and manipulate commands for subprocess execution
1414type Builder struct {
15- logger * logger.Logger
15+ logger * logger.Logger
16+ condaWarning string // Stores conda activation warning if any
1617}
1718
1819// NewBuilder creates a new command builder
@@ -31,16 +32,29 @@ func (b *Builder) Build(command []string, condaEnv string) ([]string, error) {
3132 // Apply conda activation if specified
3233 if condaEnv != "" {
3334 condaMgr := conda .NewManager (b .logger )
34- var err error
35- command , err = condaMgr .BuildActivationCommand (condaEnv , command )
35+ activatedCommand , err := condaMgr .BuildActivationCommand (condaEnv , command )
3636 if err != nil {
37- return nil , fmt .Errorf ("failed to build conda activation: %w" , err )
37+ // Store warning message for later display in interim UI
38+ b .condaWarning = fmt .Sprintf ("WARNING: Conda environment activation failed: %s. Running command without conda activation." , err .Error ())
39+
40+ // Log warning but continue with original command without conda activation
41+ b .logger .Warn ("conda environment activation failed, running command without conda activation" ,
42+ "conda_env" , condaEnv ,
43+ "error" , err .Error ())
44+ // Return original command without conda activation
45+ return command , nil
3846 }
47+ command = activatedCommand
3948 }
4049
4150 return command , nil
4251}
4352
53+ // GetCondaWarning returns the conda activation warning message if any
54+ func (b * Builder ) GetCondaWarning () string {
55+ return b .condaWarning
56+ }
57+
4458// SubstitutePort replaces jhsingle-native-proxy style placeholders in command arguments
4559// Handles: {port} → actual port, {-} → -, {--} → --, and strips surrounding quotes
4660func SubstitutePort (command []string , allocatedPort int ) []string {
0 commit comments