MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / writeCredentialsAtomic

Function writeCredentialsAtomic

src/lib/credentials.ts:140–146  ·  view source on GitHub ↗
(path: string, file: CredentialsFile)

Source from the content-addressed store, hash-verified

138}
139
140function writeCredentialsAtomic(path: string, file: CredentialsFile): void {
141 mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
142 const tmp = `${path}.tmp.${process.pid}`;
143 writeFileSync(tmp, serializeCredentials(file), { mode: 0o600, encoding: 'utf8' });
144 renameSync(tmp, path);
145 ensureRestrictiveMode(path);
146}

Callers 2

writeProfileFunction · 0.85
deleteProfileFunction · 0.85

Calls 2

serializeCredentialsFunction · 0.85
ensureRestrictiveModeFunction · 0.85

Tested by

no test coverage detected