Skip to content

Commit

Permalink
add callback to buildAce
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwing committed Jun 27, 2016
1 parent 4571a79 commit d5b8b57
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile.dryice.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function buildSubmodule(options, extra, file, callback) {
});
}

function buildAce(options) {
function buildAce(options, callback) {
var snippetFiles = jsFileList("lib/ace/snippets");
var modeNames = modeList();

Expand Down Expand Up @@ -397,7 +397,9 @@ function buildAce(options) {
if (--addCb.count > 0)
return;
if (options.check)
sanityCheck(options)
sanityCheck(options, callback);
if (callback)
return callback();
console.log("Finished building " + getTargetDir(options))
}
}
Expand Down Expand Up @@ -593,7 +595,7 @@ function getTargetDir(opts) {
return targetDir;
}

function sanityCheck(opts) {
function sanityCheck(opts, callback) {
var targetDir = getTargetDir(opts);
require("child_process").execFile(process.execPath, ["-e", "(" + function() {
window = global;
Expand All @@ -608,6 +610,7 @@ function sanityCheck(opts) {
} + ")()"], {
cwd: targetDir
}, function(err, stdout) {
if (callback) return callback(err, stdout);
if (err)
throw err;
});
Expand Down

0 comments on commit d5b8b57

Please sign in to comment.