Skip to content

Commit

Permalink
Fix lock file path
Browse files Browse the repository at this point in the history
  • Loading branch information
ManasJayanth committed Feb 6, 2025
1 parent 0e58a75 commit 10c9e79
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
33 changes: 20 additions & 13 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113066,14 +113066,6 @@ ZipStream.prototype.finalize = function() {
*/


/***/ }),

/***/ 41901:
/***/ ((module) => {

module.exports = eval("require")("./esy.lock/index.json");


/***/ }),

/***/ 22877:
Expand All @@ -113098,6 +113090,21 @@ module.exports = eval("require")("supports-color");
module.exports = eval("require")("util/types");


/***/ }),

/***/ 25387:
/***/ ((module) => {

function webpackEmptyContext(req) {
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
webpackEmptyContext.keys = () => ([]);
webpackEmptyContext.resolve = webpackEmptyContext;
webpackEmptyContext.id = 25387;
module.exports = webpackEmptyContext;

/***/ }),

/***/ 39491:
Expand Down Expand Up @@ -139584,8 +139591,8 @@ function getLatestEsyNPMInfo(alternativeEsyNPMPackage) {
else {
const { validForOldPackages, validForNewPackages, errors = [], } = lib_default()(alternativeEsyNPMPackage);
if (!validForNewPackages || !validForOldPackages) {
throw new Error(`Invalid alternative NPM package name provided: ${alternativeEsyNPMPackage}
Errors:
throw new Error(`Invalid alternative NPM package name provided: ${alternativeEsyNPMPackage}
Errors:
${errors.join("\n")}`);
}
esyPackage = `${alternativeEsyNPMPackage}@${setupEsyVersion}`;
Expand Down Expand Up @@ -139846,7 +139853,7 @@ function bundleNPMArtifacts() {
const version = exec("git describe --tags --always");
function getCompilerVersion(sandbox = "esy") {
console.log(`Looking up ${sandbox}.lock/index.json for compiler version`);
const ocamlPackages = Object.keys((__nccwpck_require__(41901).node)).filter((k) => k.startsWith("ocaml@"));
const ocamlPackages = Object.keys(__nccwpck_require__(25387)(external_path_.join(workingDirectory, `${sandbox}.lock`, "index.json")).node).filter((k) => k.startsWith("ocaml@"));
if (ocamlPackages.length === 0) {
throw new Error("Couldn't figure ocaml compiler version from lock file because no ocaml-like packages were found");
}
Expand Down Expand Up @@ -139903,8 +139910,8 @@ function bundleNPMArtifacts() {
console.log("Copying postinstall.js from", releasePostInstallJS);
external_fs_.copyFileSync(releasePostInstallJS, external_path_.join(releaseFolder, "postinstall.js"));
console.log("Creating placeholder files");
const placeholderFile = `:; echo "You need to have postinstall enabled"; exit $?
@ECHO OFF
const placeholderFile = `:; echo "You need to have postinstall enabled"; exit $?
@ECHO OFF
ECHO You need to have postinstall enabled`;
external_fs_.mkdirSync(external_path_.join(releaseFolder, "bin"));
Object.keys(bins).forEach((name) => {
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ async function bundleNPMArtifacts() {
function getCompilerVersion(sandbox = "esy") {
console.log(`Looking up ${sandbox}.lock/index.json for compiler version`);
const ocamlPackages = Object.keys(
require("./esy.lock/index.json").node
require(path.join(workingDirectory, `${sandbox}.lock`, "index.json")).node
).filter((k) => k.startsWith("ocaml@"));

if (ocamlPackages.length === 0) {
Expand Down

0 comments on commit 10c9e79

Please sign in to comment.