Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to edit_r_profile("project") due to proj_active returning unexpected NULL value #1139

Closed
leungi opened this issue May 18, 2020 · 3 comments

Comments

@leungi
Copy link

leungi commented May 18, 2020

As per subject, project is set up with an .Rproj, and its own .Rprofile.

However, usethis is unable to detect it.

Notes:

  • actual .Rproj is located in a network drive (i.e., P:/)
  • .Rproj used is located locally (i.e., C:/), with an .Rprofile such that it links to the project folder in network drive
  • this set up is to reduce latency seen in .Rproj, if accessed directly via network drive
library(usethis)

edit_r_profile("project")
#> Error: [EPERM] Failed to realize 'P:/project/enersight_type_curve/.': operation not permitted

usethis:::proj_active()
#> [1] FALSE

Created on 2020-05-18 by the reprex package (v0.3.0)

@jennybc
Copy link
Member

jennybc commented May 18, 2020

I think this is a problem being tracked at r-lib/fs#147. usethis has a hard policy on using fs for all path handling. You might want to read through that thread and see if you can contribute any insights or instructions to make it easy for @jimhester to replicate and get a handle on. It looks like there might also be a proposed workaround that you could test and report back on.

@jennybc jennybc closed this as completed May 18, 2020
@leungi
Copy link
Author

leungi commented May 18, 2020

Thanks for pointer and reference @jennybc; will heed your advice and study that issue.

@leungi
Copy link
Author

leungi commented May 19, 2020

This suggestion and patch from @bjcairns solves it 🙌🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants