diff --git a/src/utils/resolveBin.ts b/src/utils/resolveBin.ts index f9f15f3f6..d5d33e58c 100644 --- a/src/utils/resolveBin.ts +++ b/src/utils/resolveBin.ts @@ -1,7 +1,9 @@ +import { fileURLToPath } from "node:url"; + // TODO: try to see if we can avoid this altogether... // https://github.com/JoshuaKGoldberg/create-typescript-app/issues/1992 export function resolveBin(bin: string) { // This can't be tested yet in Vitest :( // https://github.com/vitest-dev/vitest/issues/6953 - return import.meta.resolve(bin).replace(/^file:\/\//gu, ""); + return fileURLToPath(import.meta.resolve(bin)); }