From 5ba8c0231ea5ac8a28e42dd4e279c1befbb8e6ce Mon Sep 17 00:00:00 2001 From: Jason Hoetger Date: Tue, 6 Dec 2016 21:44:54 -0800 Subject: [PATCH] Added simple 'version' flag to command-line launcher --- .../src/main/java/net/lightbody/bmp/proxy/Main.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/browsermob-dist/src/main/java/net/lightbody/bmp/proxy/Main.java b/browsermob-dist/src/main/java/net/lightbody/bmp/proxy/Main.java index 743cd3b4b..f82ad9d29 100644 --- a/browsermob-dist/src/main/java/net/lightbody/bmp/proxy/Main.java +++ b/browsermob-dist/src/main/java/net/lightbody/bmp/proxy/Main.java @@ -39,6 +39,11 @@ private static class LogHolder { public static void main(String[] args) { configureLogging(); + if (args.length > 0 && "--version".equals(args[0])) { + System.out.println("BrowserMob Proxy " + BrowserMobProxyUtil.getVersionString()); + System.exit(0); + } + final Injector injector = Guice.createInjector(new ConfigModule(args), new JettyModule(), new SitebricksModule() { @Override protected void configureSitebricks() {