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 c9918b93e8
commit d7edf45853
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -27,8 +27,8 @@ cache:
- ui/node_modules
before_install:
- nvm install 8
- nvm use 8
- nvm install 10
- nvm use 10
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.1
- export PATH="$HOME/.yarn/bin:$PATH"

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!');
});