Skip to content

Commit 6c61a24

Browse files
committed
Merge branch 'codota-master'
2 parents fb1d740 + d493550 commit 6c61a24

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,11 @@ fn do_locate_java_home() -> errors::Result<String> {
222222
};
223223
}
224224

225-
// Here we should have found ourselves in a directory like /usr/lib/jvm/java-8-oracle/jre/bin/java
226-
test_path.pop();
227-
test_path.pop();
225+
if !is_macos() {
226+
// Here we should have found ourselves in a directory like /usr/lib/jvm/java-8-oracle/jre/bin/java
227+
test_path.pop();
228+
test_path.pop();
229+
}
228230

229231
match test_path.to_str() {
230232
Some(s) => Ok(String::from(s)),

0 commit comments

Comments
 (0)