Skip to content
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

File system error goes uncatched #9

Open
mbiegert opened this issue Jul 17, 2020 · 0 comments
Open

File system error goes uncatched #9

mbiegert opened this issue Jul 17, 2020 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@mbiegert
Copy link

Hi,
I just stumbled across this nice action and had a look at the code.
I noticed that filesystem errors will bubble up to the caller of the action. (Not sure how github actions handles that.) But the try catch block is effectively useless to catch fs errors. (catches Buffer errors, though)

I suggest to use the synchronous way of the node fs api. Or wrap the fs.writeFile call in a promise that we can await on as the run function is marked async.

So in short: Fs errors will not reach the catch block, so core.setFailed won't be called. Maybe the github actions runner will do the same automatically when the action throws, but I am not sure.

@timheuer timheuer added bug Something isn't working help wanted Extra attention is needed labels Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants