File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/core/src/shared/credentials Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import { fileExists } from '../filesystemUtilities'
99import { isNonNullable } from '../utilities/tsUtils'
1010import { getConfigFilename , getCredentialsFilename } from '../../auth/credentials/sharedCredentialsFile'
1111import { fs } from '../../shared/fs/fs'
12+ import { waitUntil } from '../utilities/timeoutUtils'
13+ import { isWin } from '../vscode/env'
1214
1315const header = `
1416# AWS credentials file used by AWS CLI, SDKs, and tools.
@@ -98,5 +100,9 @@ export class UserCredentialsUtils {
98100 }
99101
100102 await fs . writeFile ( dest , contents . join ( '\n' ) )
103+ // Windows Race condition with writing files.
104+ if ( isWin ( ) ) {
105+ await waitUntil ( ( ) => fs . exists ( dest ) , { timeout : 5000 , interval : 100 } )
106+ }
101107 }
102108}
You can’t perform that action at this time.
0 commit comments