-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--forceLaunch flag will launch even if pre-install validations fail
- Loading branch information
1 parent
4b5aa8e
commit 1621031
Showing
12 changed files
with
306 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
backend/src/main/java/com/github/eostermueller/snail4j/CommandLineArgs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.github.eostermueller.snail4j; | ||
|
||
|
||
public class CommandLineArgs { | ||
public static final String FORCE_LAUNCH = "--forceLaunch"; | ||
public CommandLineArgs(String[] stringArgs) { | ||
args = stringArgs; | ||
} | ||
|
||
|
||
static CommandLineArgs create(String[] stringArgs) { | ||
CommandLineArgs args = new CommandLineArgs(stringArgs); | ||
return args; | ||
} | ||
String args[] = null; | ||
|
||
/** | ||
* This is a backup plan, in case snal4j has a bug/issue with prechecks/validation that unnecessarily aborts install/launch. | ||
* @return | ||
*/ | ||
public boolean isForceLaunch() { | ||
boolean found = false; | ||
for (String oneArg : args ) { | ||
if (FORCE_LAUNCH.toLowerCase().equals(oneArg.toLowerCase())) { | ||
found = true; | ||
break; | ||
} | ||
} | ||
|
||
return found; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.