Skip to content

Commit b7a11a7

Browse files
committed
Create "native" dir on demand to fix building OCaml from source on npm postinstall
1 parent 80ce472 commit b7a11a7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

native/.gitkeep

Whitespace-only changes.

scripts/buildocaml.js

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ exports.checkEnvCompiler = checkEnvCompiler;
3232
*/
3333
function ensureOCamlExistsSync() {
3434
if (!fs.existsSync(ocamlVersionFilePath)) {
35+
if (!fs.existsSync(ocamlSrcDir)) {
36+
fs.mkdirSync(ocamlSrcDir);
37+
}
38+
3539
console.log("Extracting OCaml sources...");
3640
cp.execSync(`tar xzf ../vendor/ocaml.tar.gz`, {
3741
cwd: ocamlSrcDir,

0 commit comments

Comments
 (0)