You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Import-safe entrypoints when run from non-canonical path: doesn't run #1264
**NB:**This issue may only occur when running this action outside of GitHub actions infrastructure.
When running this action with a non-canonical path, such as appears to be happening on my Forgejo setup (see details below), the "import-safe" entrypoints fail to run, printing instead:
the script is loaded as a module, so skipping the execution
The cause seems to be:
my runner loads actions into /var/run
/var/run is a symlink to /run
NodeJS appears to put a canonical path (as in: all symlinks get resolved) into import.meta.url
process.argv[1] === fileURLToPath(import.meta.url) thus evaluates to false
It'd be fantastic if there were a way to make setup-java work under these circumstances.
Details
Forgejo version: 16.0.3
Forgejo runner version: 13
Image used to run action: ghcr.io/catthehacker/ubuntu:runner-24.04
Task version:
v6
Platform:
Ubuntu
macOS
Windows
Runner type:
Hosted
Self-hosted
Repro steps:
I do not have a simple way to reproduce this, but here's a Dockerfile to demonstrate that import.meta.url contains a canonicalized path:
FROM alpine
RUN apk --no-cache add nodejs
RUN mkdir dir
RUN ln -s dir symlink
RUN echo 'console.log(`process.argv[1]: ${process.argv[1]}`); console.log(`import.meta.url: ${import.meta.url}`)' > dir/test.js
CMD node dir/test.js; node symlink/test.js
Expected behavior:
I expect the action to run normally.
Actual behavior:
The action says it won't run because the "script was loaded as a module"
Activity
Fix import-safe checks when scripts are run from a path with symlinks (…
otaconix commentedon Sep 9, 2026
Just confirming that v6.0.1 indeed fixes the issue! 🥳