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

Function closeOutputFile

src/commands/test.ts:7833–7843  ·  view source on GitHub ↗

* Flush + close the file sink. Called on the success path after the * last write and on the error path inside a `.catch(() => undefined)` * so the original error isn't masked by a teardown failure. * * Re-raises any async stream error captured by the `'error'` listener. * Without this re-raise,

(sink: FileSink)

Source from the content-addressed store, hash-verified

7831 * exactly the failure mode `--out` exists to avoid.
7832 */
7833function closeOutputFile(sink: FileSink): Promise<void> {
7834 return new Promise((resolve, reject) => {
7835 sink.stream.end(() => {
7836 if (sink.error) {
7837 reject(new TransportError(`Failed to write --out ${sink.path}: ${sink.error.message}`));
7838 return;
7839 }
7840 resolve();
7841 });
7842 });
7843}
7844
7845/** A presigned `code` body is any `https://` URL — never anything else. */
7846export function isPresignedCodeUrl(code: string): boolean {

Callers 1

runCodeGetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected