From d7edf458532ff6ac80044c6fe3e4c3d54ad9ccf0 Mon Sep 17 00:00:00 2001 From: Noelle Daley Date: Thu, 14 Feb 2019 15:11:43 -0800 Subject: [PATCH] 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 --- .travis.yml | 4 ++-- ui/scripts/start-vault.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d05c73505..13bcc38a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/ui/scripts/start-vault.js b/ui/scripts/start-vault.js index de2c2f8d6..74b5bdbd8 100755 --- a/ui/scripts/start-vault.js +++ b/ui/scripts/start-vault.js @@ -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!'); });