Merge "Fix NPE on reading global config on MAC" into stable-0.11
This commit is contained in:
commit
b46e06bc74
|
@ -66,7 +66,12 @@ public File gitPrefix() {
|
||||||
String w = readPipe(userHome(), //
|
String w = readPipe(userHome(), //
|
||||||
new String[] { "bash", "--login", "-c", "which git" }, //
|
new String[] { "bash", "--login", "-c", "which git" }, //
|
||||||
Charset.defaultCharset().name());
|
Charset.defaultCharset().name());
|
||||||
return new File(w).getParentFile().getParentFile();
|
if (w == null || w.length() == 0)
|
||||||
|
return null;
|
||||||
|
File parentFile = new File(w).getParentFile();
|
||||||
|
if (parentFile == null)
|
||||||
|
return null;
|
||||||
|
return parentFile.getParentFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue