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 split of os and os-release in system_requirements, and add unit test #609

merged 5 commits into from Jun 2, 2021


Copy link

system_requirements supports specifying an operating system like "ubuntu-16.04", in which case it's intended that the input is split along the hyphen and os = "ubuntu", os_release = "16.04". Currently, the following code causes a "non-character argument" error when this is attempted, as strsplit attempts to run on a NULL value:

  if (is.null(os_release)) {
    os_release <- strsplit(os_release, "-", fixed = TRUE)[[1]]
    # ...

This PR changes the above line to os_release <- strsplit(os, "-", fixed = TRUE)[[1]], and adds a unit test to ensure that we can determine system dependencies for the curl package when the operating system is specified as "ubuntu-16.04".

@jimhester jimhester merged commit 22c504d into r-lib:master Jun 2, 2021
Copy link

Thanks a watt!

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

Successfully merging this pull request may close these issues.

None yet

2 participants