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 66
66
let subcommandPath = Process . findExecutable ( CommandLine . arguments [ 0 ] ) ? . parentDirectory. appending ( component: subcommand)
67
67
?? Process . findExecutable ( subcommand)
68
68
69
- if subcommandPath == nil || !localFileSystem. exists ( subcommandPath!) {
69
+ guard let subcommandPath = subcommandPath,
70
+ localFileSystem. exists ( subcommandPath) else {
70
71
fatalError ( " cannot find subcommand executable ' \( subcommand) ' " )
71
72
}
72
73
74
+ // Pass the full path to subcommand executable.
75
+ var arguments = arguments
76
+ arguments [ 0 ] = subcommandPath. pathString
77
+
73
78
// Execute the subcommand.
74
- try exec ( path: subcommandPath? . pathString ?? " " , args: arguments)
79
+ try exec ( path: subcommandPath. pathString, args: arguments)
75
80
}
76
81
77
82
let executor = try SwiftDriverExecutor ( diagnosticsEngine: diagnosticsEngine,
You can’t perform that action at this time.
0 commit comments