@@ -335,7 +335,9 @@ func setupServices() {
335335 }
336336
337337 // Ensure local models dir exists
338- os .MkdirAll (localModels , 0755 )
338+ if err := os .MkdirAll (localModels , 0755 ); err != nil {
339+ fail (fmt .Sprintf ("Could not create Ollama models dir: %v" , err ))
340+ }
339341
340342 args := []string {
341343 "-p" , "11434:11434" ,
@@ -367,7 +369,12 @@ func startDockerContainer(name, image string, args []string, env []string) {
367369 }
368370
369371 // Remove if exists but stopped
370- exec .Command ("docker" , "rm" , name ).Run ()
372+ if err := exec .Command ("docker" , "rm" , name ).Run (); err != nil {
373+ // ignore if container didn't exist, but log other errors
374+ if exitErr , ok := err .(* exec.ExitError ); ! ok || exitErr .ExitCode () != 1 {
375+ warn (fmt .Sprintf ("Failed to remove existing container %s: %v" , name , err ))
376+ }
377+ }
371378
372379 // Run
373380 runArgs := []string {"run" , "-d" , "--name" , name , "--restart" , "unless-stopped" }
@@ -663,7 +670,9 @@ func updateMCPConfig(ideKey, displayName, path, binPath string) {
663670
664671 // Read existing
665672 if data , err := os .ReadFile (path ); err == nil {
666- json .Unmarshal (data , & config )
673+ if err := json .Unmarshal (data , & config ); err != nil {
674+ warn (fmt .Sprintf ("Failed to parse existing MCP config %s: %v" , path , err ))
675+ }
667676 }
668677
669678 collectionKey := "mcpServers"
0 commit comments