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

Allow symlinks in create_package #794

Closed
antass opened this issue Jun 27, 2019 · 1 comment
Closed

Allow symlinks in create_package #794

antass opened this issue Jun 27, 2019 · 1 comment
Labels
feature a feature request or enhancement paths 🚶‍♂️

Comments

@antass
Copy link

antass commented Jun 27, 2019

This issue came up when using rrtools::use_compendium which is a wrapper for usethis::create_package. Below is the issue I reported to rrtools:

When initiating a new compendium with:

rrtools::use_compendium("~/path/to/new/compendium")

where ~/path/to/new is a symlink to /some/other/path, rrtools throws an error:

> rrtools::use_compendium("~/path/to/new/compendium")
Error: '/home/nfs/user.name/path/to/new' is not a directory.

However, replacing symlink with full path works:

rrtools::use_compendium("/some/other/path/compendium")
@hadley
Copy link
Member

hadley commented Oct 17, 2019

Reprex:

library(fs)

base <- dir_create(file_temp())
base_a <- dir_create(path(base, "a"))
base_b <- link_create(base_a, path(base, "b"))

usethis::create_package(path(base_b, "c"))
#> Error: '/tmp/RtmpzLKzKT/file286037f9d19f/b' is not a directory.

Created on 2019-10-17 by the reprex package (v0.3.0)

@hadley hadley closed this as completed in dbd87c7 Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement paths 🚶‍♂️
Projects
None yet
Development

No branches or pull requests

3 participants