Skip to content

show_news() only checks {pkg}/NEWS #2499

Open
@arcresu

Description

@arcresu

The show_news() function is hard-coded to check only for NEWS in a package directory:

news_path <- path(pkg$path, "NEWS")

However (from the docs of utils::news()):

[...] it is attempted to read its news in structured form from files ‘inst/NEWS.Rd’, ‘NEWS.md’ (since R version 3.6.0, needs packages commonmark and xml2 to be available), ‘NEWS’ or ‘inst/NEWS’ (in that order).

This means that if a NEWS.md file exists, for example, there's a confusing error:

> show_news()
Error in `show_news()`:
! No NEWS found
Run `rlang::last_error()` to see where the error occurred.

It would be nice if show_news() could use the same search path as utils::news() does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions