Skip to content

Commit 13aec42

Browse files
committed
Merge pull request nodegit#490 from nodegit/fix-build-node-12
Confirm builder exists before building
2 parents 4e00f37 + 7031290 commit 13aec42

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lifecycleScripts/install.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,15 @@ function build() {
110110
target = "--target=" + nwVersion;
111111
}
112112

113-
builder = path.resolve(".", "node_modules", ".bin", builder);
114-
builder = builder.replace(/\s/g, "\\$&");
115-
var cmd = [prefix, builder, "rebuild", target, debug, distUrl]
116-
.join(" ").trim();
113+
return exec("npm install " + builder)
114+
.then(function() {
115+
builder = path.resolve(".", "node_modules", ".bin", builder);
116+
builder = builder.replace(/\s/g, "\\$&");
117+
var cmd = [prefix, builder, "rebuild", target, debug, distUrl]
118+
.join(" ").trim();
117119

118-
return exec(cmd, opts)
120+
return exec(cmd, opts);
121+
})
119122
.then(function() {
120123
console.info("[nodegit] Compilation complete.");
121124
console.info("[nodegit] Completed installation successfully.");

0 commit comments

Comments
 (0)