Skip to content

bug: patch config option doesn't work when cwd is on different drive on Windows #28923

@iuioiua

Description

@iuioiua

Sorry in advance if this is expected behaviour.

E.g. In denoland/fresh#2852, when cwd is D:\a\fresh\fresh\tmp_b61fa28752894c12b453b5f972c17bb2 and patch[0] is file:///D:/a/fresh/fresh/ (same drivers), tests within https://github.com/denoland/fresh/blob/main/init/src/init_test.ts work fine on all platforms. However, when cwd is changed to C:\Users\RUNNER~1\AppData\Local\Temp\8d9bbf697e47eaef (different drives and produced by Deno.makeTempDir()), we get the following error on Windows with the same tests:

error: Relative import path "@std/fmt/colors" not prefixed with / or ./ or ../ and not in import map from "file:///D:/a/fresh/fresh/src/app.ts"
    at file:///D:/a/fresh/fresh/src/app.ts:7:25

While this might not be the only way to solve CI for Fresh, if fixed (and fixable), it'll unblock CI for Fresh.

CC @dsherret

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs infoneeds further information to be properly triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions