Skip to content

Commit a241032

Browse files
authored
Merge pull request #1405 from compnerd/help
swift-help: use the executable suffix on Windows
2 parents 893f014 + 3b87961 commit a241032

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/swift-help/main.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ struct SwiftHelp: ParsableCommand {
140140
case .subcommand(let subcommand):
141141
// Try to find the subcommand adjacent to the help tool.
142142
// If we didn't find the tool there, let the OS search for it.
143+
#if os(Windows)
144+
let execName = "swift-\(subcommand.rawValue).exe"
145+
#else
143146
let execName = "swift-\(subcommand.rawValue)"
147+
#endif
144148
let subcommandPath = Process.findExecutable(
145149
CommandLine.arguments[0])?
146150
.parentDirectory

0 commit comments

Comments
 (0)