File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,12 @@ struct SwiftJava: AsyncParsableCommand {
186
186
}
187
187
188
188
mutating func run( ) async {
189
+ guard CommandLine . arguments. count > 1 else {
190
+ // there's no "default" command, print USAGE when no arguments/parameters are passed.
191
+ print ( " Must specify run mode. \n \( Self . helpMessage ( ) ) " )
192
+ return
193
+ }
194
+
189
195
print ( " [info][swift-java] Run: \( CommandLine . arguments. joined ( separator: " " ) ) " )
190
196
print ( " [info][swift-java] Current work directory: \( URL ( fileURLWithPath: " . " ) ) " )
191
197
print ( " [info][swift-java] Module base directory: \( moduleBaseDir) " )
@@ -230,7 +236,7 @@ struct SwiftJava: AsyncParsableCommand {
230
236
toolMode = . configuration( extraClasspath: input)
231
237
} else if fetch {
232
238
guard let input else {
233
- fatalError ( " Mode -jar requires <input> path \n \( Self . helpMessage ( ) ) " )
239
+ fatalError ( " Mode 'fetch' requires <input> path \n \( Self . helpMessage ( ) ) " )
234
240
}
235
241
config = try JavaTranslator . readConfiguration ( from: URL ( fileURLWithPath: input) )
236
242
guard let dependencies = config. dependencies else {
You can’t perform that action at this time.
0 commit comments