Skip to content

Commit 5d3a3cb

Browse files
committed
show message if ocaml/VERSION is not found
1 parent 82fba89 commit 5d3a3cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/buildocaml.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ function getVersionPrefix() {
2222
cached = version.substr(0, version.indexOf("+"));
2323
return cached;
2424
}
25+
console.error(`cannot find '${file}'`);
2526

2627
file = path.join(__dirname, "..", "OCAML_VERSION");
2728
if (fs.existsSync(file)) {
2829
var version = fs.readFileSync(file, "ascii");
2930
cached = version.substr(0, version.indexOf("+"));
3031
return cached;
3132
}
32-
3333
console.error(`cannot find '${file}'`);
34+
3435
console.error("You should create OCAML_VERSION or ocaml/VERSION file to specify OCaml version like '4.02.3+buckle-master'");
3536
console.error("For example, run `opam switch show > OCAML_VERSION`");
3637
throw new Error("version file not found");

0 commit comments

Comments
 (0)