16
16
17
17
package org .polypheny .db ;
18
18
19
-
19
+ import com . github . rvesse . airline . HelpOption ;
20
20
import com .github .rvesse .airline .SingleCommand ;
21
21
import com .github .rvesse .airline .annotations .Command ;
22
22
import com .github .rvesse .airline .annotations .Option ;
23
23
import com .github .rvesse .airline .annotations .OptionType ;
24
24
import java .awt .SystemTray ;
25
25
import java .io .File ;
26
26
import java .io .Serializable ;
27
+ import javax .inject .Inject ;
27
28
import lombok .Getter ;
28
29
import lombok .extern .slf4j .Slf4j ;
29
30
import org .polypheny .db .StatusService .ErrorConfig ;
@@ -84,6 +85,9 @@ public class PolyphenyDb {
84
85
85
86
private final TransactionManager transactionManager = new TransactionManagerImpl ();
86
87
88
+ @ Inject
89
+ public HelpOption helpOption ;
90
+
87
91
@ Option (name = { "-resetCatalog" }, description = "Reset the catalog" )
88
92
public boolean resetCatalog = false ;
89
93
@@ -131,6 +135,10 @@ public static void main( final String[] args ) {
131
135
// Hide dock icon on macOS systems
132
136
System .setProperty ( "apple.awt.UIElement" , "true" );
133
137
138
+ if (polyphenyDb .helpOption .showHelpIfRequested ()) {
139
+ return ;
140
+ }
141
+
134
142
polyphenyDb .runPolyphenyDb ();
135
143
} catch ( Throwable uncaught ) {
136
144
if ( log .isErrorEnabled () ) {
@@ -420,4 +428,4 @@ public void join( final long millis ) throws InterruptedException {
420
428
}
421
429
}
422
430
423
- }
431
+ }
0 commit comments