mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
add show version to command line args
This commit is contained in:
parent
dd9868c918
commit
e7f6f7f3db
2 changed files with 8 additions and 0 deletions
|
@ -20,6 +20,9 @@ public class Args {
|
||||||
@Parameter(names = { "--terminal", "-t" }, description = "Terminal mode", arity = 0)
|
@Parameter(names = { "--terminal", "-t" }, description = "Terminal mode", arity = 0)
|
||||||
public boolean terminal;
|
public boolean terminal;
|
||||||
|
|
||||||
|
@Parameter(names = { "--version", "-v" }, description = "Show version", arity = 0)
|
||||||
|
public boolean version;
|
||||||
|
|
||||||
@Parameter(names = { "--help", "-h" }, description = "Show usage", help = true)
|
@Parameter(names = { "--help", "-h" }, description = "Show usage", help = true)
|
||||||
public boolean help;
|
public boolean help;
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,11 @@ public class SparrowWallet {
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(args.version) {
|
||||||
|
System.out.println("Sparrow Wallet " + APP_VERSION);
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
if(args.level != null) {
|
if(args.level != null) {
|
||||||
Drongo.setRootLogLevel(args.level);
|
Drongo.setRootLogLevel(args.level);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue