Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refinement of devtools::build error message for invalid pkg path #2177

Closed
gnguy opened this issue Jan 10, 2020 · 0 comments
Closed

Refinement of devtools::build error message for invalid pkg path #2177

gnguy opened this issue Jan 10, 2020 · 0 comments
Labels
feature a feature request or enhancement

Comments

@gnguy
Copy link

gnguy commented Jan 10, 2020

When specifying an invalid path to the pkg option of devtools::build(), the following error message is returned (via the call to pkgbuild::build):

Error: path must exist.

This causes some user-confusion because there is a separate, unrelated path option for devtools::build that is passed to the dest_path option of pkgbuild::build. Without looking at the traceback, the user would likely assume that their path option to devtools::build was incorrect, rather than the pkg option.

Two potential solutions are:

  • Check the validity of the pkg path in devtools::build prior to calling pkgbuild::build using a similar set of code to this snippet (swapping in pkg instead of path)
  • Update the error snippet in pkgbuild::build to something like "Error: pkg path must exist".

From my perspective, the first option seems preferable, but I'm not sure whether that would fit philosophically with your approach of offloading much of the codebase to functions within the pkgbuild package.

@jimhester jimhester added the feature a feature request or enhancement label Apr 3, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants