Skip to content

Commit aac378d

Browse files
committed
better log?
1 parent 26463d2 commit aac378d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dev-packages/size-limit-gh-action/index.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url';
44

55
import * as artifact from '@actions/artifact';
66
import * as core from '@actions/core';
7-
import exec from '@actions/exec';
7+
import { exec } from '@actions/exec';
88
import { context, getOctokit } from '@actions/github';
99
import * as glob from '@actions/glob';
1010
import bytes from 'bytes';
@@ -151,7 +151,8 @@ class SizeLimit {
151151
async function execSizeLimit() {
152152
let output = '';
153153

154-
const status = await exec.exec('yarn', ['size-limit', '--json'], {
154+
const status = await exec('yarn', ['size-limit', '--json'], {
155+
windowsVerbatimArguments: false,
155156
ignoreReturnCode: true,
156157
cwd: process.cwd(),
157158
listeners: {
@@ -250,6 +251,7 @@ async function run() {
250251
current = limit.parseResults(output);
251252
} catch (error) {
252253
core.error('Error parsing size-limit output. The output should be a json.');
254+
core.error(output);
253255
throw error;
254256
}
255257

@@ -268,14 +270,12 @@ async function run() {
268270
if (!sizeLimitComment) {
269271
await octokit.rest.issues.createComment({
270272
...repo,
271-
// eslint-disable-next-line camelcase
272273
issue_number: pr.number,
273274
body,
274275
});
275276
} else {
276277
await octokit.rest.issues.updateComment({
277278
...repo,
278-
// eslint-disable-next-line camelcase
279279
comment_id: sizeLimitComment.id,
280280
body,
281281
});

0 commit comments

Comments
 (0)