Permalink
Browse files

added possibility to fail build on non-existing file

  • Loading branch information...
1 parent b4865ad commit 368accddf9a759575a6a80fd63c11b33f6293229 Patrick Brosset committed Nov 1, 2012
Showing with 8 additions and 3 deletions.
  1. +1 −0 libs/config.js
  2. +6 −2 libs/merger.js
  3. +1 −1 packman.js
View
@@ -7,6 +7,7 @@ var defaultConfig = {
eraseIfExists: false,
visitors: ["sep"],
exitOnFailedVisitor: false,
+ exitOnFileNotFound: false,
packages: {},
resolvedPackages: {}
};
View
@@ -38,8 +38,12 @@ function mergeOneFile(filePath, sourceDir, packageFileObject, config, visitors,
} catch(e) {
logger.logError("Could not find file " + physicalFilePath + " to be merged");
logger.logDebug(e.message);
- callback();
- return;
+ if(config.exitOnFileNotFound) {
+ process.exit(1);
+ } else {
+ callback();
+ return;
+ }
}
var fileObject = new File(filePath, physicalFilePath, fileContent, packageFileObject);
View
@@ -45,7 +45,7 @@ if(!argv.n) {
""
].join("\n"));
} else {
- console.log("\n packman is starting\n".yellow.bold);
+ console.log();
}
function getFileMTime(file) {

0 comments on commit 368accd

Please sign in to comment.