Skip to content

Commit 9af4567

Browse files
author
Joy Chang
committed
fix: do not read credentials file in webpack override scenario
1 parent ee8ee33 commit 9af4567

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/read-credentials-file.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import path = require('path');
66
const filename: string = 'ibm-credentials.env';
77

88
export function readCredentialsFile() {
9+
if (!fs.existsSync) {
10+
return {};
11+
}
12+
913
// first look for an env variable called IBM_CREDENTIALS_FILE
1014
// it should be the path to the file
1115

@@ -48,4 +52,4 @@ export function constructFilepath(filepath): string {
4852
}
4953

5054
return filepath;
51-
}
55+
}

0 commit comments

Comments
 (0)