Skip to content

.Rbuildignore is written to working directory #188

@krzyslom

Description

@krzyslom

I'm running precommit@b5899e7. When passing R project path to root param .Rbuildignore file is written in current working directory instead of the project one.

Steps to reproduce:

open <- FALSE
pkg <- "pkg"
usethis::create_package(pkg, open = open)
git2r::init(pkg)
precommit::use_precommit(open = open, root = pkg)

I believe this line

usethis::write_union(".Rbuildignore", escaped_name_target)

should be

usethis::write_union(fs::path(root, ".Rbuildignore"), escaped_name_target)

I can provide PR if you like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions