From e2f156246c327ea61db2394b5f06092152ed44e3 Mon Sep 17 00:00:00 2001 From: haxudev Date: Sat, 21 Mar 2026 09:29:10 +0800 Subject: [PATCH] Microsoft Foundry: drop unrelated Windows staging diff Restore the bundled runtime staging script to upstream so this PR stays focused on the Microsoft Foundry provider and does not carry an unrelated Windows symlink fallback change. --- scripts/stage-bundled-plugin-runtime.mjs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/scripts/stage-bundled-plugin-runtime.mjs b/scripts/stage-bundled-plugin-runtime.mjs index 4735549e160..f38f52aa6c5 100644 --- a/scripts/stage-bundled-plugin-runtime.mjs +++ b/scripts/stage-bundled-plugin-runtime.mjs @@ -7,32 +7,13 @@ function symlinkType() { return process.platform === "win32" ? "junction" : "dir"; } -function shouldFallbackToWindowsFileLink(error, type) { - return ( - process.platform === "win32" && - type !== symlinkType() && - error && - typeof error === "object" && - "code" in error && - (error.code === "EPERM" || error.code === "EACCES") - ); -} - function relativeSymlinkTarget(sourcePath, targetPath) { const relativeTarget = path.relative(path.dirname(targetPath), sourcePath); return relativeTarget || "."; } function symlinkPath(sourcePath, targetPath, type) { - try { - fs.symlinkSync(relativeSymlinkTarget(sourcePath, targetPath), targetPath, type); - } catch (error) { - if (shouldFallbackToWindowsFileLink(error, type)) { - fs.linkSync(sourcePath, targetPath); - return; - } - throw error; - } + fs.symlinkSync(relativeSymlinkTarget(sourcePath, targetPath), targetPath, type); } function shouldWrapRuntimeJsFile(sourcePath) {