|
1 | 1 | import {issue, issueCommand} from './command' |
2 | | -import { |
3 | | - issueCommand as issueFileCommand, |
4 | | - prepareKeyValueMessage as prepareCommandValue |
5 | | -} from './file-command' |
| 2 | +import {issueFileCommand, prepareKeyValueMessage} from './file-command' |
6 | 3 | import {toCommandProperties, toCommandValue} from './utils' |
7 | 4 |
|
8 | 5 | import * as os from 'os' |
@@ -89,7 +86,7 @@ export function exportVariable(name: string, val: any): void { |
89 | 86 |
|
90 | 87 | const filePath = process.env['GITHUB_ENV'] || '' |
91 | 88 | if (filePath) { |
92 | | - return issueFileCommand('ENV', prepareCommandValue(name, val)) |
| 89 | + return issueFileCommand('ENV', prepareKeyValueMessage(name, val)) |
93 | 90 | } |
94 | 91 |
|
95 | 92 | issueCommand('set-env', {name}, convertedVal) |
@@ -191,7 +188,7 @@ export function getBooleanInput(name: string, options?: InputOptions): boolean { |
191 | 188 | export function setOutput(name: string, value: any): void { |
192 | 189 | const filePath = process.env['GITHUB_OUTPUT'] || '' |
193 | 190 | if (filePath) { |
194 | | - return issueFileCommand('OUTPUT', prepareCommandValue(name, value)) |
| 191 | + return issueFileCommand('OUTPUT', prepareKeyValueMessage(name, value)) |
195 | 192 | } |
196 | 193 |
|
197 | 194 | process.stdout.write(os.EOL) |
@@ -351,7 +348,7 @@ export async function group<T>(name: string, fn: () => Promise<T>): Promise<T> { |
351 | 348 | export function saveState(name: string, value: any): void { |
352 | 349 | const filePath = process.env['GITHUB_STATE'] || '' |
353 | 350 | if (filePath) { |
354 | | - return issueFileCommand('STATE', prepareCommandValue(name, value)) |
| 351 | + return issueFileCommand('STATE', prepareKeyValueMessage(name, value)) |
355 | 352 | } |
356 | 353 |
|
357 | 354 | issueCommand('save-state', {name}, toCommandValue(value)) |
|
0 commit comments