Skip to content

Commit c308fdd

Browse files
authored
Merge pull request #31 from crazy-max/fix-setoutput
Fix setOutput behavior
2 parents a803c66 + 1e2879c commit c308fdd

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

dist/index.js

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as mexec from './exec';
22
import * as core from '@actions/core';
33
import * as exec from '@actions/exec';
4+
import {issueCommand} from '@actions/core/lib/command';
45

56
interface Platforms {
67
supported: string[];
@@ -32,12 +33,17 @@ async function run(): Promise<void> {
3233
}
3334
const platforms: Platforms = JSON.parse(res.stdout.trim());
3435
core.info(`${platforms.supported.join(',')}`);
35-
core.setOutput('platforms', platforms.supported.join(','));
36+
setOutput('platforms', platforms.supported.join(','));
3637
});
3738
core.endGroup();
3839
} catch (error) {
3940
core.setFailed(error.message);
4041
}
4142
}
4243

44+
// FIXME: Temp fix https://github.com/actions/toolkit/issues/777
45+
function setOutput(name: string, value: any): void {
46+
issueCommand('set-output', {name}, value);
47+
}
48+
4349
run();

0 commit comments

Comments
 (0)