File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 3030 if case . subcommand( let subcommand) = mode {
3131 // We are running as a subcommand, try to find the subcommand adjacent to the executable we are running as.
3232 // If we didn't find the tool there, let the OS search for it.
33- let subcommandPath = Process . findExecutable ( arguments [ 0 ] ) ? . parentDirectory. appending ( component: subcommand)
34- ?? Process . findExecutable ( subcommand)
33+ #if os(Windows)
34+ let filename = subcommand + " .exe "
35+ #else
36+ let filename = subcommand
37+ #endif
38+ let subcommandPath = Process . findExecutable ( arguments [ 0 ] ) ? . parentDirectory. appending ( component: filename)
39+ ?? Process . findExecutable ( filename)
3540
3641 if subcommandPath == nil || !localFileSystem. exists ( subcommandPath!) {
37- fatalError ( " cannot find subcommand executable ' \( subcommand ) ' " )
42+ fatalError ( " cannot find subcommand executable ' \( filename ) ' " )
3843 }
3944
4045 // Execute the subcommand.
You can’t perform that action at this time.
0 commit comments