throw an error when starting vault if one occurs (#6235)

* throw an error when starting vault if one occurs

* use node 10

* do not use shorthand
This commit is contained in:
Noelle Daley
2019-02-14 15:11:43 -08:00
committed by GitHub
parent b9373b07d7
commit a15bbee8f9
2 changed files with 7 additions and 4 deletions

View File

@@ -42,7 +42,10 @@ readline
if (root && unseal) {
fs.writeFile(
path.join(process.cwd(), 'tests/helpers/vault-keys.js'),
`export default ${JSON.stringify({ unseal, root }, null, 2)}`
`export default ${JSON.stringify({ unseal, root }, null, 2)}`,
err => {
if (err) throw err;
}
);
console.log('VAULT SERVER READY');
@@ -71,7 +74,7 @@ process.on('exit', function() {
vault.kill('SIGINT');
});
fs.writeFile(pidFile, process.pid, (err) => {
fs.writeFile(pidFile, process.pid, err => {
if (err) throw err;
console.log('The file has been saved!');
});