Skip to content

Commit

Permalink
Makes esyInstallRelease.js copying optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ManasJayanth committed Jul 29, 2024
1 parent 702211a commit 9711087
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
10 changes: 8 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
15 changes: 10 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 9711087

Please sign in to comment.