From 2b9e57d36722a1e5d629639527cf5c1a54b1c720 Mon Sep 17 00:00:00 2001 From: Tim Noonan Date: Tue, 26 Mar 2019 14:56:41 -0600 Subject: [PATCH] fix: move generating the secretfile path to the catch block --- src/keyChainImpl.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/keyChainImpl.ts b/src/keyChainImpl.ts index 3340c19e63..88f7343254 100644 --- a/src/keyChainImpl.ts +++ b/src/keyChainImpl.ts @@ -571,12 +571,12 @@ export class GenericWindowsKeychainAccess extends GenericKeychainAccess { if (err != null) { await cb(err); } else { - const secretFile: string = path.join( - await ConfigFile.resolveRootFolder(true), - Global.STATE_FOLDER, - ensure(KeychainConfig.getDefaultOptions().filename) - ); try { + const secretFile: string = path.join( + await ConfigFile.resolveRootFolder(true), + Global.STATE_FOLDER, + ensure(KeychainConfig.getDefaultOptions().filename) + ); await fs.access(secretFile, fs.constants.R_OK | fs.constants.W_OK); await cb(null); } catch (e) {