We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ba1365 commit 816c77cCopy full SHA for 816c77c
Sources/SwiftJavaTool/SwiftJava.swift
@@ -39,6 +39,20 @@ struct SwiftJava: AsyncParsableCommand {
39
JExtractCommand.self
40
])
41
42
+ public static func main() async {
43
+ do {
44
+ var command = try parseAsRoot(nil)
45
+ if var asyncCommand = command as? AsyncParsableCommand {
46
+ try await asyncCommand.run()
47
+ } else {
48
+ try command.run()
49
+ }
50
+ } catch {
51
+ print("Invocation: \(CommandLine.arguments.joined(separator: " "))")
52
+ exit(withError: error)
53
54
55
+
56
mutating func run() async throws {
57
guard CommandLine.arguments.count >= 2 else {
58
// there's no "default" command, print USAGE when no arguments/parameters are passed.
0 commit comments