mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 07:57:12 -07:00
Merge branch 'master' of github.com:cbeust/kobalt
This commit is contained in:
commit
7a2c4f34da
3 changed files with 13 additions and 2 deletions
|
@ -101,5 +101,8 @@ class Args {
|
|||
|
||||
@Parameter(names = arrayOf("--update"), description = "Update to the latest version of Kobalt")
|
||||
var update: Boolean = false
|
||||
|
||||
@Parameter(names = arrayOf("--version"), description = "Display the current version of Kobalt")
|
||||
var version: Boolean = false
|
||||
}
|
||||
|
||||
|
|
|
@ -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,14 @@ class Main @Inject constructor(
|
|||
companion object {
|
||||
fun mainNoExit(argv: Array<String>): Int {
|
||||
val (jc, args) = parseArgs(argv)
|
||||
if (args.usage) {
|
||||
jc.usage()
|
||||
return 0
|
||||
}
|
||||
if (args.version) {
|
||||
println("Kobalt ${Kobalt.version}")
|
||||
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