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

Relative paths for local source RemoteUrl? #873

Closed
johnbaums opened this issue Nov 22, 2021 · 2 comments
Closed

Relative paths for local source RemoteUrl? #873

johnbaums opened this issue Nov 22, 2021 · 2 comments

Comments

@johnbaums
Copy link

I have a git repository containing package source (within subdirectory my_package) and a renv lockfile. For context, the repo is private, and I'd rather not mess with PATs or gitlab/github credentials (e.g. to use remotes::install_gitlab), particularly seeing as the package is contained within the project anyway.

To capture my_package in the lockfile, I use:

renv::install('./my-package')
renv::snapshot()

However, the RemoteUrl stores the full path to the package: /home/john/my_project/my_package. This is problematic when the lockfile is commited back to the repo and another user then clones it into their home directory.

I can edit the RemoteUrl manually to relative path, ./my_package, but renv then complains about the lockfile being out sync, and the relative path is overwritten on subsequent snapshots.

So, is it possible to somehow force renv to use a relative path for local sources?

@kevinushey
Copy link
Collaborator

It's not currently possible, but I agree this is a bug given that it makes it impossible to share the lockfile with others. I'll take a look.

@kevinushey
Copy link
Collaborator

Now implemented with df1ac96. Thanks for the report!

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