Skip to content

Commit

Permalink
fix: move generating the secretfile path to the catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
tnoonan-salesforce committed Mar 26, 2019
1 parent f03838c commit 2b9e57d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/keyChainImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2b9e57d

Please sign in to comment.