jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] branch master updated: Fall back to JMETER_HOME on startup (even more fall-back)
Date Fri, 28 Aug 2020 07:50:27 GMT
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new fd8b994  Fall back to JMETER_HOME on startup (even more fall-back)
fd8b994 is described below

commit fd8b99411eb442df44cd0d779e0c7505c5a6adc1
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Fri Aug 28 09:46:53 2020 +0200

    Fall back to JMETER_HOME on startup (even more fall-back)
    
    Use JMETER_HOME as a fall back even before trying user.dir.
    
    Relates to 20ba58d0c0273d1857a3c1b614d32617faf7f7ce
    Bugzilla Id: 64680
---
 src/launcher/src/main/java/org/apache/jmeter/NewDriver.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java b/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java
index a662b79..41bd8b7 100644
--- a/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java
+++ b/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java
@@ -79,8 +79,8 @@ public final class NewDriver {
                 tmpDir = null;
             }
         } else {// e.g. started from IDE with full classpath
-            tmpDir = System.getProperty("jmeter.home","");// Allow override $NON-NLS-1$ $NON-NLS-2$
-            if (tmpDir.length() == 0) {
+            tmpDir = System.getProperty("jmeter.home", System.getenv("JMETER_HOME"));// Allow
override $NON-NLS-1$ $NON-NLS-2$
+            if (tmpDir == null || tmpDir.length() == 0) {
                 File userDir = new File(System.getProperty("user.dir"));// $NON-NLS-1$
                 tmpDir = userDir.getAbsoluteFile().getParent();
             }


Mime
View raw message