Skip to content

Commit

Permalink
Merge pull request #1405 from compnerd/help
Browse files Browse the repository at this point in the history
swift-help: use the executable suffix on Windows
  • Loading branch information
compnerd committed Jul 27, 2023
2 parents 893f014 + 3b87961 commit a241032
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/swift-help/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ struct SwiftHelp: ParsableCommand {
case .subcommand(let subcommand):
// Try to find the subcommand adjacent to the help tool.
// If we didn't find the tool there, let the OS search for it.
#if os(Windows)
let execName = "swift-\(subcommand.rawValue).exe"
#else
let execName = "swift-\(subcommand.rawValue)"
#endif
let subcommandPath = Process.findExecutable(
CommandLine.arguments[0])?
.parentDirectory
Expand Down

0 comments on commit a241032

Please sign in to comment.