Skip to content

Commit 6c2ebac

Browse files
committed
Handle run with the --help flag so that it brings up the help
1 parent b1deb64 commit 6c2ebac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/Swiftly/Run.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ internal struct Run: SwiftlyCommand {
5656
internal mutating func run() async throws {
5757
try validateSwiftly()
5858

59+
// Handle the specific case where help is requested of the run subcommand
60+
if command == ["--help"] {
61+
print(Run.helpMessage(for: Run.self))
62+
Foundation.exit(0)
63+
}
64+
5965
var config = try Config.load()
6066

6167
let (command, selector) = try extractProxyArguments(command: self.command)

0 commit comments

Comments
 (0)