Skip to content
This repository has been archived by the owner on Jan 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #538 from bem/fix/save-cache
Browse files Browse the repository at this point in the history
Save build cache data only on successful build
  • Loading branch information
Sergej Tatarincev committed Jan 14, 2014
2 parents f7f07b4 + abd1c59 commit 0fe53d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/tech/v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,13 @@ var Q = require('q'),
return _this.validate(file, filteredFiles, opts)
.then(function(valid) {
LOGGER.fverbose('file %s is %s', file, valid?'valid':'not valid');

if (!valid) {
_this.saveLastUsedData(file, {buildFiles: filteredFiles});

return _this.getBuildResult(filteredFiles, destSuffix, output, opts)
.then(function(r) {
res[destSuffix] = r;
return _this.saveLastUsedData(file, {buildFiles: filteredFiles});
});
}
});
Expand Down

0 comments on commit 0fe53d6

Please sign in to comment.