Skip to content

edit_r_profile("user") should test R_PROFILE_USER first #480

@heavywatal

Description

@heavywatal

Currently, edit_r_profile() and edit_r_environ() always try to create/edit a file directly on the user's home directory regardless of R_PROFILE_USER and R_ENVIRON_USER.

Sys.setenv(R_PROFILE_USER = "/tmp/path/to/.Rprofile")
Sys.getenv('R_PROFILE_USER')
#> [1] "/tmp/path/to/.Rprofile"
usethis::edit_r_profile()
#> ● Edit /Users/watal/.Rprofile
#> ● Restart R for changes to take effect

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions