Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

When filePath is absolute GITHUB_WORKSPACE shouldn't be joined #176

Closed
pfichtner opened this issue Dec 31, 2022 · 2 comments · Fixed by #180
Closed

When filePath is absolute GITHUB_WORKSPACE shouldn't be joined #176

pfichtner opened this issue Dec 31, 2022 · 2 comments · Fixed by #180

Comments

@pfichtner
Copy link

When passing '/tmp/foobar.txt' as filePath (filePath: /tmp/foobar.txt) I got the error
Error: ENOENT: no such file or directory, open '/home/runner/work/user/project/tmp/foobar.txt'

_filePath = path.join(GITHUB_WORKSPACE, filePath);

@pfichtner
Copy link
Author

Is the join needed at all? Shouldn't be used filePath directly without joining GITHUB_WORKSPACE? I guess that way absolute as well relative files should work out of the box!?

@thollander
Copy link
Owner

thollander commented Jan 14, 2023

Is the join needed at all? Shouldn't be used filePath directly without joining GITHUB_WORKSPACE? I guess that way absolute as well relative files should work out of the box!?

Indeed you're right !
Thanks for the feedback.

Released in https://github.com/thollander/actions-comment-pull-request/releases/tag/v2.3.1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants