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

Bug: Can't install a package without imports #352

Open
jrosell opened this issue Oct 25, 2024 · 0 comments
Open

Bug: Can't install a package without imports #352

jrosell opened this issue Oct 25, 2024 · 0 comments

Comments

@jrosell
Copy link
Contributor

jrosell commented Oct 25, 2024

Here an example:

rix::rix(
  r_ver = "bleeding_edge",
  r_pkgs = c("tidyverse", "digest", "bench"),
  git_pkgs = list(list(package_name = "uwu", repo_url = "https://github.com/JosiahParry/uwu/", commit = "cb20213e6faed74323634c404334c0fbdfdebfaf"))
)
#> Error in strsplit(unlist(imports), split = ","): non-character argument

I assume it's here because {uwu} has no imports.

output <- unname(trimws(unlist(strsplit(unlist(imports), split = ","))))

Not tested, but here a suggested fix:

if (!is.null(imports) && length(imports) > 0) {
  output <- unname(trimws(unlist(strsplit(unlist(imports), split = ","))))
} else {
  output <- character(0) 
}
@jrosell jrosell changed the title Bug: Can't install package without imports Bug: Can't install a package without imports Oct 25, 2024
jrosell added a commit to jrosell/rix that referenced this issue Oct 25, 2024
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

No branches or pull requests

1 participant