Skip to content

Commit

Permalink
only pass arguments down (#9266)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr authored Oct 22, 2022
1 parent 76bd95b commit c20c390
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/java/org/jabref/cli/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
*/
public class Launcher {
private static Logger LOGGER;
private static String[] ARGUMENTS;

public static void main(String[] args) {
ARGUMENTS = args;
addLogToDisk();
try {
// Init preferences
Expand Down Expand Up @@ -74,7 +76,7 @@ public static void main(String[] args) {
return;
}

MainApplication.create(argumentProcessor.getParserResults(), argumentProcessor.isBlank(), preferences);
MainApplication.main(argumentProcessor.getParserResults(), argumentProcessor.isBlank(), preferences, ARGUMENTS);
} catch (ParseException e) {
LOGGER.error("Problem parsing arguments", e);
JabRefCLI.printUsage();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/gui/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ public class MainApplication extends Application {
private static boolean isBlank;
private static JabRefPreferences preferences;

public static void create(List<ParserResult> parserResults, boolean blank, JabRefPreferences preferences) {
public static void main(List<ParserResult> parserResults, boolean blank, JabRefPreferences preferences, String[] args) {
MainApplication.parserResults = parserResults;
MainApplication.isBlank = blank;
MainApplication.preferences = preferences;
launch();
launch(args);
}

@Override
Expand Down

0 comments on commit c20c390

Please sign in to comment.