Skip to content

Commit

Permalink
Make manifest.esy property optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ManasJayanth committed Jul 26, 2024
1 parent a9184da commit 9a600a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141542,11 +141542,12 @@ function compress(dir, outputFile) {
}
function prepareNPMArtifacts() {
return __awaiter(this, void 0, void 0, function* () {
var _a;
const statusCmd = manifestKey ? `esy ${manifestKey} status` : "esy status";
try {
const manifestFilePath = JSON.parse(external_child_process_.execSync(statusCmd).toString()).rootPackageConfigPath;
const manifest = JSON.parse(external_fs_.readFileSync(manifestFilePath).toString());
if (manifest.esy.release) {
if ((_a = manifest.esy) === null || _a === void 0 ? void 0 : _a.release) {
yield runEsyCommand("Running esy npm-release", ["npm-release"]);
}
let tarFile = `npm-tarball.tgz`;
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ async function prepareNPMArtifacts() {
cp.execSync(statusCmd).toString()
).rootPackageConfigPath;
const manifest = JSON.parse(fs.readFileSync(manifestFilePath).toString());
if (manifest.esy.release) {
if (manifest.esy?.release) {
await runEsyCommand("Running esy npm-release", ["npm-release"]);
}
let tarFile = `npm-tarball.tgz`;
Expand Down

0 comments on commit 9a600a1

Please sign in to comment.