Fix location of reaper jar on Windows (#45464)
(cherry picked from commit 5021c5d8bf815ed11a2fe9cf4d3a2c2ed2e2e0b3)
This commit is contained in:
parent
82d48cfcc9
commit
2a1f0c7b4a
|
@ -142,7 +142,13 @@ public class ReaperService {
|
|||
Matcher matcher = REAPER_JAR_PATH_PATTERN.matcher(mainPath);
|
||||
|
||||
if (matcher.matches()) {
|
||||
return Path.of(matcher.group(1));
|
||||
String path = matcher.group(1);
|
||||
return Path.of(
|
||||
OS.<String>conditional()
|
||||
.onWindows(() -> path.substring(1))
|
||||
.onUnix(() -> path)
|
||||
.supply()
|
||||
);
|
||||
} else {
|
||||
throw new RuntimeException("Unable to locate " + REAPER_CLASS + " on build classpath.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue