diff --git a/dist/index.js b/dist/index.js index d8089d5..39c5748 100644 --- a/dist/index.js +++ b/dist/index.js @@ -141605,8 +141605,14 @@ function bundleNPMArtifacts() { acc.push(folderName); return acc; }, []); - const esyInstallReleaseJS = "esyInstallRelease.js"; - external_fs_.cpSync(external_path_.join(releaseFolder, artifactFoldersList[0], esyInstallReleaseJS), external_path_.join(releaseFolder, esyInstallReleaseJS)); + try { + const esyInstallReleaseJS = "esyInstallRelease.js"; + external_fs_.cpSync(external_path_.join(releaseFolder, artifactFoldersList[0], esyInstallReleaseJS), external_path_.join(releaseFolder, esyInstallReleaseJS)); + } + catch (e) { + console.warn("Could not copy esyInstallRelease.js", e); + console.log("Skipping esyInstallRelease.js as it is optional"); + } console.log("Creating package.json"); const possibleEsyJsonPath = external_path_.join(workingDirectory, "esy.json"); const possiblePackageJsonPath = external_path_.join(workingDirectory, "package.json"); diff --git a/index.ts b/index.ts index 745e009..000db77 100644 --- a/index.ts +++ b/index.ts @@ -360,11 +360,16 @@ async function bundleNPMArtifacts() { }, [] ); - const esyInstallReleaseJS = "esyInstallRelease.js"; - fs.cpSync( - path.join(releaseFolder, artifactFoldersList[0], esyInstallReleaseJS), - path.join(releaseFolder, esyInstallReleaseJS) - ); + try { + const esyInstallReleaseJS = "esyInstallRelease.js"; + fs.cpSync( + path.join(releaseFolder, artifactFoldersList[0], esyInstallReleaseJS), + path.join(releaseFolder, esyInstallReleaseJS) + ); + } catch (e) { + console.warn("Could not copy esyInstallRelease.js", e); + console.log("Skipping esyInstallRelease.js as it is optional"); + } console.log("Creating package.json"); const possibleEsyJsonPath = path.join(workingDirectory, "esy.json"); const possiblePackageJsonPath = path.join(workingDirectory, "package.json");