mirror of
https://github.com/apple/pkl.git
synced 2026-04-22 00:08:33 +02: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) {
|
private URI parsedModuleNotationToUri(Object notation) {
|
||||||
if (notation instanceof File file) {
|
if (notation instanceof File file) {
|
||||||
|
if (file.isAbsolute()) {
|
||||||
|
return file.toPath().toUri();
|
||||||
|
}
|
||||||
return IoUtils.createUri(IoUtils.toNormalizedPathString(file.toPath()));
|
return IoUtils.createUri(IoUtils.toNormalizedPathString(file.toPath()));
|
||||||
} else if (notation instanceof URI uri) {
|
} else if (notation instanceof URI uri) {
|
||||||
return uri;
|
return uri;
|
||||||
|
|||||||
Reference in New Issue
Block a user