-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-version-file
should support absolute paths
#852
Comments
Hello @sidvishnoi. Thank you for your report. We'll take a look on it. |
Hi folks, I'm running into this issue as well, trying to use It's a pretty frustrating and unexpected behavior as far as I can tell. Any hope to see a fix to this soon? 🙌 |
@actions/setup-actions-team @HarithaVattikuti Apologies for the pings, but it looks like Dmitry hasn't been active on this project in a long time, and this issue may have slipped through the cracks. It would be awesome if someone could take a look at this and any other issues that may have been buried. |
Hi @sidvishnoi, Thank you for your suggestion to support absolute paths in the node-version-file. Although we do not have any plans to add this feature at this time, we will consider it as a feature request for the future.
This script calculates the relative path from the GitHub workspace to the action directory and sets it as the node-version-file, ensuring the path is resolved correctly within the repository context. I hope this clarifies the issue and provides a suitable workaround. If you have any further questions, please feel free to ask. |
Hi @sidvishnoi, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know. |
@gowridurgad the workaround you shared above is what I created for W3C 😉 Further assistance would be not requiring this workaround. |
Hi @sidvishnoi, Here is an additional workaround you can use:
This script will create a symbolic link from the root of your repository to the .nvmrc file in your action directory before setting up Node.js. |
Hi @sidvishnoi, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know. |
@gowridurgad There's no point in asking me for updates, as you've said "we will consider it as a feature request for the future." Asking over and over will not get a different answer from me, given it was me who suggested the workarounds you're sharing in one way or other. |
Hi @sidvishnoi, Thank you for your feedback. As mentioned previously, we have noted this as a feature request for future consideration. We have sent a reminder to check if the second workaround worked for you. Apologies if it feels repetitive, but our intention is to ensure clarity and keep the discussion transparent. We truly appreciate your patience and continued engagement. |
It would solve the issue to add a new context entry similar to github.action_path. Perhaps it would be called github.relative_action_path and would hold the relative path to the action's base folder from the working folder. |
Description:
If we pass a absolute path to
node-version-file
, for example, when using with Composite Actions, the resulting path is resolved incorrectly, due to apath.join()
call.setup-node/src/main.ts
Lines 96 to 100 in 5e21ff4
Action version:
v3
Platform:
Runner type:
Tools version:
Repro steps:
.nvmrc
, use following as input:Example broken action run: https://github.com/sidvishnoi/mediasession/actions/runs/6158104300/job/16710218833?pr=1
Expected behavior:
If it can check whether provided
node-version-file
exists as is, or perhaps usepath.resolve()
, it won't break with absolute paths.Actual behavior:
The text was updated successfully, but these errors were encountered: