only remove file if it actually exists :/

This commit is contained in:
jash
2018-11-01 19:41:07 +01:00
committed by kexkey
parent 91f8dc2346
commit 914f4fa69e

View File

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