Skip to content
Permalink
Browse files

JENKINS-24265: detect when environment variable isn't set. Point to i…

…ssue and workaround
  • Loading branch information
lacostej committed May 26, 2015
1 parent da01def commit 6859427102914f0906f68aa4317e43191b971e7b
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/org/jenkinsci/plugins/unity3d/Unity3dInstallation.java
@@ -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"));

0 comments on commit 6859427

Please sign in to comment.
You can’t perform that action at this time.