Skip to content

Commit

Permalink
JENKINS-24265: detect when environment variable isn't set. Point to i…
Browse files Browse the repository at this point in the history
…ssue and workaround
  • Loading branch information
lacostej committed May 26, 2015
1 parent da01def commit 6859427
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -118,7 +118,11 @@ private File getEditorLogFile(String customLogFile) {
if (customLogFile != null) return new File(customLogFile);

if (Functions.isWindows()) {
File applocaldata = new File(EnvVars.masterEnvVars.get("LOCALAPPDATA"));
String localAppData = EnvVars.masterEnvVars.get("LOCALAPPDATA");
if (localAppData == null) {
throw new RuntimeException("Empty LOCALAPPDATA environment variable. Use -logFile command line argument as workaround. Unable to find Editor.log location (see JENKINS-24265).");
}
File applocaldata = new File(localAppData);
return new File(applocaldata, "Unity/Editor/Editor.log");
} else { // mac assumed
File userhome = new File(EnvVars.masterEnvVars.get("HOME"));
Expand Down

0 comments on commit 6859427

Please sign in to comment.