Skip to content

Commit 0550466

Browse files
authored
Handle run with the --help flag so that it brings up the help (#225)
* Handle run with the --help flag so that it brings up the help * Use the CleanExit API instead of manually printing the help message
1 parent 7517530 commit 0550466

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/Swiftly/Run.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ 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+
throw CleanExit.helpRequest(self)
62+
}
63+
5964
var config = try Config.load()
6065

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

0 commit comments

Comments
 (0)