mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-15 00:02:49 +03:00
MacOS tests fix: new way of discovering work dir conflicts with tests execution. Fixed.
This commit is contained in:
@ -168,10 +168,14 @@ public class BaseNoGui {
|
||||
File path = new File(System.getProperty("user.dir"));
|
||||
|
||||
if (OSUtils.isMacOS()) {
|
||||
try {
|
||||
path = new File(BaseNoGui.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile();
|
||||
} catch (URISyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
if (System.getProperty("WORK_DIR") != null) {
|
||||
path = new File(System.getProperty("WORK_DIR"));
|
||||
} else {
|
||||
try {
|
||||
path = new File(BaseNoGui.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile();
|
||||
} catch (URISyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user