Honor $JENKINS_HOME.

Honor $JENKINS_HOME (just like we used to do $HUDSON_HOME)
We still fall back to $HUDSON_HOME every step of the way
for maximum backward compatibility.

I wasn't initially planning to do this for the first version,
but working on native packages made me think we should deliver this.
This commit is contained in:
Kohsuke Kawaguchi committed 2011-01-30 16:25:58 -08:00
1 parent 62100264ac
commit 8ea876faa4
13 files changed
+65 -48

No files matched your search

+4 -2
View File
@@ -64,7 +64,7 @@ public class Main {
public static int run(String[] args) throws Exception {
String home = getHudsonHome();
if (home==null) {
System.err.println("HUDSON_HOME is not set.");
System.err.println("JENKINS_HOME is not set.");
return -1;
}
if (args.length < 2) {
@@ -76,7 +76,9 @@ public class Main {
}
private static String getHudsonHome() {
return EnvVars.masterEnvVars.get("HUDSON_HOME");
String home = EnvVars.masterEnvVars.get("JENKINS_HOME");
if (home!=null) return home;
return EnvVars.masterEnvVars.get("JENKINS_HOME");
}
/**