File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -19304,6 +19304,7 @@ var require_stack_utils = __commonJS({
1930419304});
1930519305
1930619306// node_modules/@reporters/github/index.js
19307+ var { fileURLToPath } = require("node:url");
1930719308var path = require("node:path");
1930819309var util = require("node:util");
1930919310var { EOL } = require("node:os");
@@ -19312,10 +19313,13 @@ var StackUtils = require_stack_utils();
1931219313var WORKSPACE = process.env.GITHUB_WORKSPACE ?? "";
1931319314var stack = new StackUtils({ cwd: WORKSPACE, internals: StackUtils.nodeInternals() });
1931419315var isFile = (name) => name?.startsWith(WORKSPACE);
19315- var getRelativeFilePath = (name) => isFile(name) ? path.relative(WORKSPACE, require.resolve( name) ?? "" ) : null;
19316+ var getRelativeFilePath = (name) => isFile(name) ? path.relative(WORKSPACE, name) : null;
1931619317function getFilePath(fileName) {
1931719318 if (fileName.startsWith("file://")) {
19318- return getRelativeFilePath(new URL(fileName).pathname);
19319+ return getRelativeFilePath(fileURLToPath(fileName));
19320+ }
19321+ if (!path.isAbsolute(fileName)) {
19322+ return getRelativeFilePath(path.resolve(fileName) ?? "");
1931919323 }
1932019324 return getRelativeFilePath(fileName);
1932119325}
You can’t perform that action at this time.
0 commit comments