]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
SONARPLUGINS-3329 Display "SONAR_RUNNER_OPTS" in the console if it is set
authorJulien HENRY <julien.henry@sonarsource.com>
Thu, 3 Apr 2014 15:00:03 +0000 (17:00 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Thu, 3 Apr 2014 15:00:03 +0000 (17:00 +0200)
sonar-runner-dist/src/main/java/org/sonar/runner/SystemInfo.java

index dff7f17c91e8f84f38f24886ad35696ac8bed9dc..a35c29b68a5e6b660bdc0eda10825f75dd83afab 100644 (file)
@@ -31,15 +31,19 @@ class SystemInfo {
     System.out.println("SonarQube Runner " + RunnerVersion.version());
     System.out.println(java());
     System.out.println(os());
+    String runnerOpts = System.getenv("SONAR_RUNNER_OPTS");
+    if (runnerOpts != null) {
+      System.out.println("SONAR_RUNNER_OPTS=" + runnerOpts);
+    }
   }
 
   static String java() {
     StringBuilder sb = new StringBuilder();
     sb
-        .append("Java ")
-        .append(System.getProperty("java.version"))
-        .append(" ")
-        .append(System.getProperty("java.vendor"));
+      .append("Java ")
+      .append(System.getProperty("java.version"))
+      .append(" ")
+      .append(System.getProperty("java.vendor"));
     String bits = System.getProperty("sun.arch.data.model");
     if ("32".equals(bits) || "64".equals(bits)) {
       sb.append(" (").append(bits).append("-bit)");
@@ -50,11 +54,11 @@ class SystemInfo {
   static String os() {
     StringBuilder sb = new StringBuilder();
     sb
-        .append(System.getProperty("os.name"))
-        .append(" ")
-        .append(System.getProperty("os.version"))
-        .append(" ")
-        .append(System.getProperty("os.arch"));
+      .append(System.getProperty("os.name"))
+      .append(" ")
+      .append(System.getProperty("os.version"))
+      .append(" ")
+      .append(System.getProperty("os.arch"));
     return sb.toString();
   }
 }