Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ var Promise = require("nodegit-promise");
var promisify = require("promisify-node");
var fse = promisify(require("fs-extra"));
var findParentDir = promisify(require('find-parent-dir'));
fse.ensureDir = promisify(fse.ensureDir, function() { return true; });

var exec = promisify(function(command, opts, callback) {
return require("child_process").exec(command, opts, callback);
Expand Down Expand Up @@ -69,10 +68,17 @@ if (NODE_VERSION === 0.1) {
pkg.http_parser = pkg.http_parser["0.10"];
}

fse.ensureDir(path.resolve(__dirname, paths.release))
.then(detectNodeWebkit.call(null, __dirname))
.then(fetch)
.then(finish, compile);
// ensureDir doesn't promisify correctly so right now just use the callback
fse.ensureDir(path.resolve(__dirname, paths.release), function(err) {
if (err) {
console.log(err);
}
else {
detectNodeWebkit.call(null, __dirname)
.then(fetch)
.then(finish, compile);
}
});

function fetch() {
console.info("[nodegit] Fetching binary from S3.");
Expand Down