MCPcopy
hub / github.com/desktop/desktop / setOutput

Function setOutput

script/draft-release/ci.ts:48–62  ·  view source on GitHub ↗

* Writes key=value pairs to $GITHUB_OUTPUT if running in Actions, * otherwise prints them to stdout.

(pairs: Record<string, string>)

Source from the content-addressed store, hash-verified

46 * otherwise prints them to stdout.
47 */
48function setOutput(pairs: Record<string, string>): void {
49 const outputFile = process.env.GITHUB_OUTPUT
50 const lines = Object.entries(pairs)
51 .map(([k, v]) => `${k}=${v}`)
52 .join('\n')
53
54 if (outputFile) {
55 appendFileSync(outputFile, lines + '\n')
56 }
57
58 // Always print for visibility in logs
59 for (const [k, v] of Object.entries(pairs)) {
60 console.log(`${k}=${v}`)
61 }
62}
63
64async function commandVersion(channel: Channel): Promise<void> {
65 const previous = await getLatestRelease({

Callers 1

commandVersionFunction · 0.85

Calls 1

logMethod · 0.45

Tested by

no test coverage detected