Skip to content

Commit

Permalink
Merge branch 'master' of github.com:sintaxi/harp into release-v0.14.0
Browse files Browse the repository at this point in the history
Conflicts:
	package.json
  • Loading branch information
kennethormandy committed Sep 10, 2014
2 parents c6b7075 + 5b41c0e commit 49f4d6d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
25 changes: 13 additions & 12 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,21 +191,22 @@ exports.compile = function(projectPath, outputPath, callback){
*/

var compileFile = function(file, done){
terra.render(file, function(error, body){
if(error){
done(error)
}else{
if(body){
var dest = path.resolve(outputPath, terraform.helpers.outputPath(file))
fs.mkdirp(path.dirname(dest), function(err){
fs.writeFile(dest, body, done)
})
process.nextTick(function () {
terra.render(file, function(error, body){
if(error){
done(error)
}else{
done()
if(body){
var dest = path.resolve(outputPath, terraform.helpers.outputPath(file))
fs.mkdirp(path.dirname(dest), function(err){
fs.writeFile(dest, body, done)
})
}else{
done()
}
}
}
})
})

}


Expand Down
4 changes: 2 additions & 2 deletions test/multihost.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ describe("multihost", function(){
var len = urls.length;
var titles = [];
for (var i = 0; i < len; i++) {
(function(n){
(function(i){
var site = $(urls[i]).attr('href');
request(site, function(e,r,b) {
$ = cherio.load(b);
r.statusCode.should.eql(200);
titles.push($("h1").text());
if (n+1 == len) {
if (i+1 == len) {
arrayUnique(titles).length.should.eql(len)
}
});
Expand Down

0 comments on commit 49f4d6d

Please sign in to comment.