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

Improve error detection on failed download #78

Merged
merged 2 commits into from Apr 11, 2020

Conversation

zeehio
Copy link
Contributor

@zeehio zeehio commented Apr 9, 2020

When a package can't be downloaded, a warning appears:

Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘vcd’ failed

The package is not installed, but install2.r returns successfully even though
we use --error.

This commit captures that warning so the error can be captured and returned.

One way to simulate this error is by making /tmp/downloaded_packages not writeable.

When a package can't be downloaded, a warning appears:

    Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
      download of package ‘vcd’ failed

The package is not installed and install2.r returns successfully (even though
we use --error).

This commit captures that warning so the error can be raised
Copy link
Owner

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good (and useful) to me! I'll poke @cboettig too who is behind this option and feature but I see no reason not to merge (though I still always prefer an issue ticket prior to a PR but as this one is small I can see that would maybe be too much formalism...)

@eddelbuettel eddelbuettel merged commit 33a75a6 into eddelbuettel:master Apr 11, 2020
@cboettig
Copy link
Contributor

apologies for the slow reply but this looks good to me!

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

Successfully merging this pull request may close these issues.

None yet

3 participants