mirror of
https://github.com/apple/pkl.git
synced 2026-03-12 21:25:19 +01:00
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:
@@ -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