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

local_package_deps: throw clear warning when pkgdir is not valid? #756

Open
MatthieuStigler opened this issue May 10, 2023 · 2 comments
Open
Labels
bug an unexpected problem or unintended behavior help wanted ❤️ we'd love your help!

Comments

@MatthieuStigler
Copy link
Contributor

This is a small detail, but it would be nice to have local_package_deps fail in a cleaner way when pkgdir is not found?

Currently, this triggers the correct message, but only as warning, then triggering a subsequent error:

#> Warning in normalizePath(path): path[1]="wrongpath": No such file or directory
#> Error in if (!is_dir(path)) {: missing value where TRUE/FALSE needed

library(remotes)
packageVersion("remotes")
#> [1] '2.4.2.9000'
local_package_deps("wrongpath")
#> Warning in normalizePath(path): path[1]="wrongpath": No such file or directory
#> Error in if (!is_dir(path)) {: missing value where TRUE/FALSE needed

Created on 2023-05-10 with reprex v2.0.2

@gaborcsardi gaborcsardi added bug an unexpected problem or unintended behavior help wanted ❤️ we'd love your help! labels Nov 1, 2023
@gaborcsardi
Copy link
Member

A PR is welcome!

@MatthieuStigler
Copy link
Contributor Author

ok, just added mustWork = TRUE in normalizePath, now warning becomes error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior help wanted ❤️ we'd love your help!
Projects
None yet
Development

No branches or pull requests

2 participants