eliminate a warning
authorGil Moskowitz <gmoskowitz@xtuple.com>
Tue, 16 Sep 2014 16:15:49 +0000 (12:15 -0400)
committerGil Moskowitz <gmoskowitz@xtuple.com>
Tue, 16 Sep 2014 16:15:49 +0000 (12:15 -0400)
scripts/lib/build_database.js

index 6f64695..c0446c0 100644 (file)
@@ -190,9 +190,8 @@ var  async = require('async'),
           return memo + script;
         }, "");
 
-        // Without this, when we delegate to exec psql the err var will not be set even
-        // on the case of error.
-        allSql = "\\set ON_ERROR_STOP TRUE;\n" + allSql;
+        // Without this, psql runs all input and returns success even if errors occurred
+        allSql = "\\set ON_ERROR_STOP TRUE\n" + allSql;
 
         winston.info("Applying build to database " + spec.database);
         credsClone.database = spec.database;