Skip to content

Commit 32397af

Browse files
committed
scripts/ci/check_changeset.ts: fix TS compilation error
1 parent f358119 commit 32397af

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scripts/ci/check_changeset.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ const git = simpleGit(root);
2929
const baseRef = process.env.GITHUB_PULL_REQUEST_BASE_SHA || 'master';
3030
const headRef = process.env.GITHUB_PULL_REQUEST_HEAD_SHA || 'HEAD';
3131

32+
const githubOutputFile = (function (): string {
33+
const value = process.env.GITHUB_OUTPUT;
34+
if (!value) {
35+
throw new Error('GITHUB_OUTPUT environment variable must be set');
36+
}
37+
return value;
38+
})();
39+
3240
// Version bump text converted to rankable numbers.
3341
const bumpRank: Record<string, number> = {
3442
'patch': 0,
@@ -208,7 +216,7 @@ async function main() {
208216
*/
209217
if (errors.length > 0) {
210218
await writeFile(
211-
process.env.GITHUB_OUTPUT,
219+
githubOutputFile,
212220
`CHANGESET_ERROR_MESSAGE=${errors.join('%0A')}\n`,
213221
{ flag: 'a' }
214222
);

0 commit comments

Comments
 (0)