Merge pull request #1668 from shackbarth/payco
authorTravis Webb <travis@traviswebb.com>
Mon, 14 Jul 2014 19:16:24 +0000 (15:16 -0400)
committerTravis Webb <travis@traviswebb.com>
Mon, 14 Jul 2014 19:16:24 +0000 (15:16 -0400)
remove payco demo data. fixes #1642.

scripts/lib/build_database.js

index 8a3f525..d86e089 100644 (file)
@@ -223,9 +223,9 @@ var  async = require('async'),
         winston.info("Applying build to database " + spec.database);
         credsClone.database = spec.database;
         buildDatabaseUtil.sendToDatabase(allSql, credsClone, spec, function (err, res) {
-          if (spec.populateData) {
+          if (spec.populateData && creds.encryptionKeyFile) {
             var populateSql = "DO $$ XT.disableLocks = true; $$ language plv8;";
-            var encryptionKey = fs.readFileSync(path.join(__dirname, "../../node-datasource", creds.encryptionKeyFile), "utf8");
+            var encryptionKey = fs.readFileSync(path.resolve(__dirname, "../../node-datasource", creds.encryptionKeyFile), "utf8");
             var patches = require(path.join(__dirname, "../../enyo-client/database/source/populate_data")).patches;
             _.each(patches, function (patch) {
               patch.encryptionKey = encryptionKey;