FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed promise chain on install by johnhaley81 · Pull Request #339 · nodegit/nodegit · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
16 changes: 11 additions & 5 deletions install.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL