MCPcopy Create free account
hub / github.com/cli/cli / save

Function save

evals/src/core/io.ts:81–86  ·  view source on GitHub ↗
(path: string, value: unknown, secrets: string[] = [])

Source from the content-addressed store, hash-verified

79}
80
81export async function save(path: string, value: unknown, secrets: string[] = []): Promise<void> {
82 await mkdir(dirname(path), { recursive: true, mode: 0o700 });
83 const temporary = `${path}.tmp`;
84 await writeFile(temporary, redact(JSON.stringify(value, null, 2) + "\n", secrets), { mode: 0o600 });
85 await rename(temporary, path);
86}

Callers 5

mainFunction · 0.85
journalResourceFunction · 0.85
createSandboxFunction · 0.85
cleanupSandboxFunction · 0.85
trialMethod · 0.85

Calls 2

redactFunction · 0.85
writeFileFunction · 0.50

Tested by

no test coverage detected