diff --git a/src/main/java/com/sparrowwallet/sparrow/Args.java b/src/main/java/com/sparrowwallet/sparrow/Args.java index 93a3d423..3c885358 100644 --- a/src/main/java/com/sparrowwallet/sparrow/Args.java +++ b/src/main/java/com/sparrowwallet/sparrow/Args.java @@ -20,6 +20,9 @@ public class Args { @Parameter(names = { "--terminal", "-t" }, description = "Terminal mode", arity = 0) public boolean terminal; + @Parameter(names = { "--version", "-v" }, description = "Show version", arity = 0) + public boolean version; + @Parameter(names = { "--help", "-h" }, description = "Show usage", help = true) public boolean help; diff --git a/src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java b/src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java index 59324ab6..e01f0880 100644 --- a/src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java +++ b/src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java @@ -34,6 +34,11 @@ public class SparrowWallet { System.exit(0); } + if(args.version) { + System.out.println("Sparrow Wallet " + APP_VERSION); + System.exit(0); + } + if(args.level != null) { Drongo.setRootLogLevel(args.level); }