From 914f4fa69e853c6f1921ac9e7bfb0258ce1c7b5e Mon Sep 17 00:00:00 2001 From: jash Date: Thu, 1 Nov 2018 19:41:07 +0100 Subject: [PATCH] only remove file if it actually exists :/ --- install/generator-cyphernode/generators/app/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/generator-cyphernode/generators/app/index.js b/install/generator-cyphernode/generators/app/index.js index 57574e4..bdf822b 100644 --- a/install/generator-cyphernode/generators/app/index.js +++ b/install/generator-cyphernode/generators/app/index.js @@ -273,7 +273,8 @@ module.exports = class extends Generator { if( this.props.gatekeeper_keys && this.props.gatekeeper_keys.clientInformation ) { - if( this.gatekeeper_clientkeyspassword !== this.props.gatekeeper_clientkeyspassword ) { + if( this.gatekeeper_clientkeyspassword !== this.props.gatekeeper_clientkeyspassword && + fs.existsSync(this.destinationPath('clientKeys.7z')) ) { fs.unlinkSync( this.destinationPath('clientKeys.7z') ); }