mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 12:02:20 +00:00
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:
1 parent
62100264ac
commit
8ea876faa4
13 files changed
+65
-48
No files matched your search
@@ -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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user