Fix location of reaper jar on Windows (#45464)

(cherry picked from commit 5021c5d8bf815ed11a2fe9cf4d3a2c2ed2e2e0b3)
This commit is contained in:
Mark Vieira 2019-08-12 13:24:18 -07:00
parent 82d48cfcc9
commit 2a1f0c7b4a
No known key found for this signature in database
GPG Key ID: CA947EF7E6D4B105
1 changed files with 7 additions and 1 deletions

View File

@ -142,7 +142,13 @@ public class ReaperService {
Matcher matcher = REAPER_JAR_PATH_PATTERN.matcher(mainPath); Matcher matcher = REAPER_JAR_PATH_PATTERN.matcher(mainPath);
if (matcher.matches()) { 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 { } else {
throw new RuntimeException("Unable to locate " + REAPER_CLASS + " on build classpath."); throw new RuntimeException("Unable to locate " + REAPER_CLASS + " on build classpath.");
} }