Skip to content

find_package_root_file has uninformative error context #119

Open
@JosiahParry

Description

@JosiahParry

I recently noticed that when rprojroot fails to find a file, the error that is shown is from normalizePath() and it doesn't show that it comes from find_package_root_file().

rprojroot::find_package_root_file("DESCRIPTION", path = "../definitelynot")
#> Error in `normalizePath()`:
#> ! path[1]="../definitelynot": No such file or directory

It would be very nice if there were an error_call = rlang::caller_call() argument here so that nicer error messages can be bubbled up. We use {rprojroot} extensively in {rextendr}.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions