fix(scripts): better error handling for script runner and GDPR

This commit is contained in:
Sabe Jones
2018-10-12 15:27:31 +00:00
parent c64ea0a9a9
commit 6f5b9ef119
2 changed files with 14 additions and 8 deletions

View File

@@ -17,12 +17,12 @@ function setUpServer () {
setUpServer();
// Replace this with your migration
const processUsers = require('./users/takeThis.js');
const processUsers = require('../scripts/gdpr-delete-users.js');
processUsers()
.then(function success () {
process.exitCode = 0;
process.exit(0);
})
.catch(function failure (err) {
console.log(err);
process.exitCode = 1;
process.exit(1);
});