mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 07:57:12 -07:00
No longer create directories, etc. when --help or --version are used.
This commit is contained in:
parent
18c6f38948
commit
41ba68c630
2 changed files with 6 additions and 2 deletions
|
@ -47,7 +47,6 @@ public class Main {
|
|||
|
||||
private int installAndLaunchMain(String[] argv) throws IOException, InterruptedException {
|
||||
String version = getVersion();
|
||||
initWrapperFile(version);
|
||||
|
||||
List<String> kobaltArgv = new ArrayList<>();
|
||||
boolean noLaunch = false;
|
||||
|
@ -78,6 +77,7 @@ public class Main {
|
|||
}
|
||||
int result = 0;
|
||||
if (! exit) {
|
||||
initWrapperFile(version);
|
||||
Path kobaltJarFile = installDistribution();
|
||||
if (!noLaunch) {
|
||||
result = launchMain(kobaltJarFile, kobaltArgv);
|
||||
|
@ -133,7 +133,7 @@ public class Main {
|
|||
}
|
||||
|
||||
private String getWrapperVersion() {
|
||||
return wrapperProperties.getProperty(PROPERTY_VERSION);
|
||||
return wrapperProperties.getProperty(PROPERTY_VERSION, "N/A");
|
||||
}
|
||||
|
||||
private String getWrapperDownloadUrl(String version) {
|
||||
|
|
|
@ -38,6 +38,10 @@ class Main @Inject constructor(
|
|||
companion object {
|
||||
fun mainNoExit(argv: Array<String>): Int {
|
||||
val (jc, args) = parseArgs(argv)
|
||||
if (args.usage) {
|
||||
jc.usage()
|
||||
return 0
|
||||
}
|
||||
Kobalt.init(MainModule(args, KobaltSettings.readSettingsXml()))
|
||||
val result = launchMain(Kobalt.INJECTOR.getInstance(Main::class.java), jc, args, argv)
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue