mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
system property should take a higher priority than environment variable, as environment variables inherit from processes to processes, system properties don't.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6904 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
37390621c2
commit
49a3763b9e
1 file changed
+5
-5
@@ -208,15 +208,15 @@ public class WebAppMain implements ServletContextListener {
|
||||
// ignore
|
||||
}
|
||||
|
||||
// look at the env var next
|
||||
String env = EnvVars.masterEnvVars.get("HUDSON_HOME");
|
||||
if(env!=null)
|
||||
return new File(env.trim()).getAbsoluteFile();
|
||||
|
||||
// finally check the system property
|
||||
String sysProp = System.getProperty("HUDSON_HOME");
|
||||
if(sysProp!=null)
|
||||
return new File(sysProp.trim());
|
||||
|
||||
// look at the env var next
|
||||
String env = EnvVars.masterEnvVars.get("HUDSON_HOME");
|
||||
if(env!=null)
|
||||
return new File(env.trim()).getAbsoluteFile();
|
||||
|
||||
// otherwise pick a place by ourselves
|
||||
|
||||
|
||||
Reference in new issue
Block a user