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

Fix unhandled promise rejections #528

Merged
merged 7 commits into from
Mar 14, 2022
Merged

Fix unhandled promise rejections #528

merged 7 commits into from
Mar 14, 2022

Conversation

nikeee
Copy link
Contributor

@nikeee nikeee commented Mar 12, 2022

While forking and refactoring this action, I discovered some issues. This is a backport to upstream of these fixes.

In case the installation fails, the exception is not propagated to the try-catch in run(), but dropped instead.
We resolve this by returning their promises.

Resolves #515

nikeee added 3 commits March 12, 2022 18:39
In case the installation fails, the exception is not propagated to the try-catch in `run()`, but dropped instead.
We resolve this by returning their promises.

Resolves #515
Makes use of definite-assignment analysis.
@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2022

Codecov Report

Merging #528 (80e566c) into v2-branch (80377d9) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           v2-branch      #528   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
===========================================
  Files              2         2           
  Lines             10        10           
===========================================
  Hits              10        10           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80377d9...80e566c. Read the comment docs.

nikeee added 2 commits March 12, 2022 18:59
Falls back to the error itself, if the catch param does not have a message.

Before, accessing `err.message` would print `undefined`
because strings were thrown.
nikeee added a commit to nikeee/setup-pandoc that referenced this pull request Mar 12, 2022
Some fixes were published upstream:
r-lib/actions#528
When the network is slow or down, it is good to see
what is going on.
@gaborcsardi
Copy link
Member

Thanks! This action uses node 12, still, so made some small updates and regenerated the JS with an older typescript.

@gaborcsardi gaborcsardi merged commit eae0c34 into r-lib:v2-branch Mar 14, 2022
@github-actions
Copy link

github-actions bot commented Nov 4, 2022

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pandoc install failure not shown as failure
3 participants