Title: Import-safe entrypoints when run from non-canonical path: doesn't run · Issue #1264 · actions/setup-java · GitHub
Open Graph Title: Import-safe entrypoints when run from non-canonical path: doesn't run · Issue #1264 · actions/setup-java
X Title: Import-safe entrypoints when run from non-canonical path: doesn't run · Issue #1264 · actions/setup-java
Description: Description: **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),...
Open Graph Description: Description: **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 ...
X Description: Description: **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 ...
Opengraph URL: https://github.com/actions/setup-java/issues/1264
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Import-safe entrypoints when run from non-canonical path: doesn't run","articleBody":"**Description:**\n\n**NB:**This issue may only occur when running this action outside of GitHub actions infrastructure.\n\nWhen 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:\n\n> `the script is loaded as a module, so skipping the execution`\n\nThe cause seems to be:\n1. my runner loads actions into `/var/run`\n2. `/var/run` is a symlink to `/run`\n3. NodeJS appears to put a canonical path (as in: all symlinks get resolved) into `import.meta.url`\n4. `process.argv[1] === fileURLToPath(import.meta.url)` thus evaluates to false\n\nIt'd be fantastic if there were a way to make `setup-java` work under these circumstances.\n\n**Details**\n\nForgejo version: 16.0.3\nForgejo runner version: 13\nImage used to run action: ghcr.io/catthehacker/ubuntu:runner-24.04\n\n**Task version:**\nv6\n\n**Platform:**\n- [x] Ubuntu\n- [ ] macOS\n- [ ] Windows\n\n**Runner type:**\n- [ ] Hosted\n- [x] Self-hosted\n\n**Repro steps:** \nI do not have a simple way to reproduce this, but here's a `Dockerfile` to demonstrate that `import.meta.url` contains a canonicalized path:\n\n```dockerfile\nFROM alpine\n\nRUN apk --no-cache add nodejs\nRUN mkdir dir\nRUN ln -s dir symlink\nRUN echo 'console.log(`process.argv[1]: ${process.argv[1]}`); console.log(`import.meta.url: ${import.meta.url}`)' > dir/test.js\n\nCMD node dir/test.js; node symlink/test.js\n```\n\n**Expected behavior:**\nI expect the action to run normally.\n\n**Actual behavior:**\nThe action says it won't run because the \"script was loaded as a module\"","author":{"url":"https://github.com/otaconix","@type":"Person","name":"otaconix"},"datePublished":"2026-09-07T18:04:44Z","url":"https://github.com/actions/setup-java/issues/1264"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:239ff44a-97b8-3a0e-98ca-021c4e38e7c2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B0AC:1587FA:72709F:98AC82:6AED2450 |
| html-safe-nonce | 107e907c814507b59075b77388a91105f34685d499ef074625c36457489b00ea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEFDOjE1ODdGQTo3MjcwOUY6OThBQzgyOjZBRUQyNDUwIiwidmlzaXRvcl9pZCI6IjYwNDA3MDA1ODk2ODkzNDkyMDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0495ef349d7aef71323fe775ab7bc08dc3ec7c1e6c876f393a8873a8e611a0f9 |
| hovercard-subject-tag | issue:5377797079 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/setup-java/1264/issue_layout |
| twitter:image | https://opengraph.githubassets.com/40e5ea0325eaecd09a68b892afbf3ceb2311a95e040f02932a276315b918a761/actions/setup-java/issues/1264 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/40e5ea0325eaecd09a68b892afbf3ceb2311a95e040f02932a276315b918a761/actions/setup-java/issues/1264 |
| og:image:alt | Description: **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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | otaconix |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/setup-java git https://github.com/actions/setup-java.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 196057608 |
| octolytics-dimension-repository_nwo | actions/setup-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 196057608 |
| octolytics-dimension-repository_network_root_nwo | actions/setup-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width