File tree Expand file tree Collapse file tree
Core/Sources/GitHubCopilotService Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,10 +66,6 @@ public class GitHubCopilotBaseService {
6666 self . projectRootURL = projectRootURL
6767 let ( server, localServer) = try {
6868 let urls = try GitHubCopilotBaseService . createFoldersIfNeeded ( )
69- var userEnvPath = ProcessInfo . processInfo. userEnvironment [ " PATH " ] ?? " "
70- if userEnvPath. isEmpty {
71- userEnvPath = " /usr/bin:/usr/local/bin " // fallback
72- }
7369 let executionParams : Process . ExecutionParameters
7470 let runner = UserDefaults . shared. value ( for: \. runNodeWith)
7571
@@ -95,7 +91,7 @@ public class GitHubCopilotBaseService {
9591 )
9692 } ( )
9793 case . shell:
98- let shell = ProcessInfo . processInfo. userEnvironment [ " SHELL " ] ?? " /bin/bash "
94+ let shell = ProcessInfo . processInfo. shellExecutablePath
9995 let nodePath = UserDefaults . shared. value ( for: \. nodePath)
10096 let command = [
10197 nodePath. isEmpty ? " node " : nodePath,
@@ -111,6 +107,7 @@ public class GitHubCopilotBaseService {
111107 )
112108 } ( )
113109 case . env:
110+ let userEnvPath = " /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin "
114111 executionParams = {
115112 let nodePath = UserDefaults . shared. value ( for: \. nodePath)
116113 return Process . ExecutionParameters (
You can’t perform that action at this time.
0 commit comments