diff --git a/resources/scripts/install-bun.js b/resources/scripts/install-bun.js index bbe7d5aa..6087c191 100644 --- a/resources/scripts/install-bun.js +++ b/resources/scripts/install-bun.js @@ -110,7 +110,8 @@ async function downloadBunBinary(platform, arch, version = DEFAULT_BUN_VERSION, const sourcePath = path.join(sourceDir, file) const destPath = path.join(binDir, file) - fs.renameSync(sourcePath, destPath) + fs.copyFileSync(sourcePath, destPath) + fs.unlinkSync(sourcePath) // Set executable permissions for non-Windows platforms if (platform !== 'win32') { diff --git a/resources/scripts/install-uv.js b/resources/scripts/install-uv.js index d6378f63..773ff24c 100644 --- a/resources/scripts/install-uv.js +++ b/resources/scripts/install-uv.js @@ -123,7 +123,8 @@ async function downloadUvBinary(platform, arch, version = DEFAULT_UV_VERSION, is for (const file of files) { const sourcePath = path.join(sourceDir, file) const destPath = path.join(binDir, file) - fs.renameSync(sourcePath, destPath) + fs.copyFileSync(sourcePath, destPath) + fs.unlinkSync(sourcePath) // Set executable permissions for non-Windows platforms if (platform !== 'win32') {