Skip to content

Commit 6e4c25f

Browse files
committed
[NSTask] Pass complete path as argv[0]
This allows executables to derive their own absolute path. SwiftPM relies on this value to derive the compiler path and fake toolchain path.
1 parent fb734e1 commit 6e4c25f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/NSTask.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public class NSTask : NSObject {
194194

195195
// Convert the arguments array into a posix_spawn-friendly format
196196

197-
var args = [launchPath.lastPathComponent]
197+
var args = [launchPath]
198198
if let arguments = self.arguments {
199199
args.append(contentsOf: arguments)
200200
}

0 commit comments

Comments
 (0)