|  | 
| 5 | 5 | import java.io.IOException; | 
| 6 | 6 | import java.nio.charset.Charset; | 
| 7 | 7 | import java.nio.file.Files; | 
|  | 8 | +import java.nio.file.Path; | 
| 8 | 9 | import java.nio.file.Paths; | 
| 9 | 10 | import java.util.List; | 
| 10 | 11 | import java.util.Map; | 
| @@ -48,7 +49,9 @@ private static String[] extendFromFileArgs(String[] args) throws IOException { | 
| 48 | 49 |     if (workspace == null || workspace.trim().isEmpty()) | 
| 49 | 50 |       throw new IllegalArgumentException(RULES_SCALA_MAIN_WS_NAME + " is null or empty."); | 
| 50 | 51 | 
 | 
| 51 |  | -    String runnerArgsFilePath = Runfiles.create().rlocation(workspace + "/" + runnerArgsFileKey); | 
|  | 52 | + | 
|  | 53 | +    Path runnerArgsUnresolvedFileLocation = Paths.get(workspace + "/" + runnerArgsFileKey).normalize(); | 
|  | 54 | +    String runnerArgsFilePath = Runfiles.create().rlocation(runnerArgsUnresolvedFileLocation.toString()); | 
| 52 | 55 |     if (runnerArgsFilePath == null) | 
| 53 | 56 |       throw new IllegalArgumentException("rlocation value is null for key: " + runnerArgsFileKey); | 
| 54 | 57 | 
 | 
| @@ -90,7 +93,8 @@ private static void rlocateRunpathValue(String rulesWorkspace, List<String> runn | 
| 90 | 93 |       String[] runpathElements = runnerArgs.get(runpathFlag + 1).split(File.pathSeparator); | 
| 91 | 94 |       Runfiles runfiles = Runfiles.create(); | 
| 92 | 95 |       for (int i = 0; i < runpathElements.length; i++) { | 
| 93 |  | -        runpathElements[i] = runfiles.rlocation(rulesWorkspace + "/" + runpathElements[i]); | 
|  | 96 | +        Path runPathElementPath = Paths.get(rulesWorkspace + "/" + runpathElements[i]).normalize(); | 
|  | 97 | +        runpathElements[i] = runfiles.rlocation(runPathElementPath.toString()); | 
| 94 | 98 |       } | 
| 95 | 99 |       String runpath = String.join(File.separator, runpathElements); | 
| 96 | 100 |       runnerArgs.set(runpathFlag + 1, runpath); | 
|  | 
0 commit comments