diff --git a/internal/linker/index.js b/internal/linker/index.js index 35b4cdf1c5..9a60a9552d 100644 --- a/internal/linker/index.js +++ b/internal/linker/index.js @@ -416,7 +416,7 @@ function main(args, runfiles) { runfilesPath = runfilesPath.slice(externalPrefix.length); } else { - runfilesPath = `${workspace}/${runfilesPath}`; + runfilesPath = path.posix.join(workspace, runfilesPath); } try { target = runfiles.resolve(runfilesPath); diff --git a/internal/linker/link_node_modules.ts b/internal/linker/link_node_modules.ts index dcf7381727..104f8655d4 100644 --- a/internal/linker/link_node_modules.ts +++ b/internal/linker/link_node_modules.ts @@ -623,7 +623,7 @@ export async function main(args: string[], runfiles: Runfiles) { if (runfilesPath.startsWith(externalPrefix)) { runfilesPath = runfilesPath.slice(externalPrefix.length); } else { - runfilesPath = `${workspace}/${runfilesPath}`; + runfilesPath = path.posix.join(workspace, runfilesPath); } try { target = runfiles.resolve(runfilesPath);