Skip to content

Commit bc7f0b5

Browse files
committed
fix dirname
1 parent fe8c33f commit bc7f0b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { promises as fs } from 'node:fs';
22
import path from 'node:path';
3+
import { fileURLToPath } from 'node:url'
34

45
import * as artifact from '@actions/artifact';
56
import * as core from '@actions/core';
@@ -191,6 +192,7 @@ async function run() {
191192
const octokit = getOctokit(githubToken);
192193
const limit = new SizeLimit();
193194
const artifactClient = artifact.create();
195+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
194196
const resultsFilePath = path.resolve(__dirname, RESULTS_FILE);
195197

196198
// If we have no comparison branch, we just run size limit & store the result as artifact
@@ -215,7 +217,7 @@ async function run() {
215217
});
216218
const files = await globber.glob();
217219

218-
await artifactClient.uploadArtifact(ARTIFACT_NAME, files, __dirname);
220+
await artifactClient.uploadArtifact(ARTIFACT_NAME, files, process.env);
219221

220222
return;
221223
}

0 commit comments

Comments
 (0)