From ebd5dcc6d62841dbcd120351919cdf7cf59f5933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 11 Oct 2022 08:13:59 -0400 Subject: [PATCH] fix: EEXISTS error on linux if plugin/theme overrides core js file --- src/meta/js.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/meta/js.js b/src/meta/js.js index 69ab76f369..454b682cc3 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -27,14 +27,6 @@ JS.scripts = { modules: { }, }; -async function linkIfLinux(srcPath, destPath) { - if (process.platform === 'win32') { - await fs.promises.copyFile(srcPath, destPath); - } else { - await file.link(srcPath, destPath, true); - } -} - const basePath = path.resolve(__dirname, '../..'); async function linkModules() { @@ -55,7 +47,7 @@ async function linkModules() { if (stats.isDirectory()) { await file.linkDirs(srcPath, destPath, true); } else { - await linkIfLinux(srcPath, destPath); + await fs.promises.copyFile(srcPath, destPath); } })); }