mirror of
https://github.com/ollama/ollama.git
synced 2026-04-17 15:53:27 +02:00
launch/vscode: prefer known vs code paths over code on PATH (#15073)
This commit is contained in:
@@ -25,11 +25,8 @@ type VSCode struct{}
|
||||
func (v *VSCode) String() string { return "Visual Studio Code" }
|
||||
|
||||
// findBinary returns the path/command to launch VS Code, or "" if not found.
|
||||
// It checks for the "code" CLI on PATH first, then falls back to platform-specific locations.
|
||||
// It checks platform-specific locations only.
|
||||
func (v *VSCode) findBinary() string {
|
||||
if _, err := exec.LookPath("code"); err == nil {
|
||||
return "code"
|
||||
}
|
||||
var candidates []string
|
||||
switch runtime.GOOS {
|
||||
case "darwin":
|
||||
|
||||
Reference in New Issue
Block a user