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
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: