File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 6666 let subcommandPath = Process . findExecutable ( CommandLine . arguments [ 0 ] ) ? . parentDirectory. appending ( component: subcommand)
6767 ?? Process . findExecutable ( subcommand)
6868
69- if subcommandPath == nil || !localFileSystem. exists ( subcommandPath!) {
69+ guard let subcommandPath = subcommandPath,
70+ localFileSystem. exists ( subcommandPath) else {
7071 fatalError ( " cannot find subcommand executable ' \( subcommand) ' " )
7172 }
7273
74+ // Pass the full path to subcommand executable.
75+ var arguments = arguments
76+ arguments [ 0 ] = subcommandPath. pathString
77+
7378 // Execute the subcommand.
74- try exec ( path: subcommandPath? . pathString ?? " " , args: arguments)
79+ try exec ( path: subcommandPath. pathString, args: arguments)
7580 }
7681
7782 let executor = try SwiftDriverExecutor ( diagnosticsEngine: diagnosticsEngine,
You can’t perform that action at this time.
0 commit comments