Fix usage of file() notation with Pkl Gradle plugin on Windows (#611)
This is a port of a fix that was included in https://github.com/apple/pkl/pull/403.
This commit is contained in:
1 parent
d097341abd
commit
f9a3fc88fd
1 file changed
+3
@@ -134,6 +134,9 @@ public abstract class ModulesTask extends BasePklTask {
|
||||
*/
|
||||
private URI parsedModuleNotationToUri(Object notation) {
|
||||
if (notation instanceof File file) {
|
||||
if (file.isAbsolute()) {
|
||||
return file.toPath().toUri();
|
||||
}
|
||||
return IoUtils.createUri(IoUtils.toNormalizedPathString(file.toPath()));
|
||||
} else if (notation instanceof URI uri) {
|
||||
return uri;
|
||||
|
||||
Reference in new issue
Block a user