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

Inconsistent handling of ~ path expansion #585

Closed
sellorm opened this issue Jan 10, 2022 · 1 comment · Fixed by #586
Closed

Inconsistent handling of ~ path expansion #585

sellorm opened this issue Jan 10, 2022 · 1 comment · Fixed by #586

Comments

@sellorm
Copy link
Contributor

sellorm commented Jan 10, 2022

In some places this works as expected, for instance in board_folder it works fine.

However, when specifying files for upload with pin_upload it does not work - see below.

In addition, the error message refers to a variable name 'path', which is not used in the function call, which instead uses 'paths'.

board <- pins::board_folder("~/tmp/pins")

board |> pins::pin_upload("~/Documents/all_the_things.jpg")
#> Error: All elements of `path` must exist

rlang::last_error()
#> <error/rlang_error>
#> All elements of `path` must exist
#> Backtrace:
#>  1. pins::pin_upload(board, "~/Documents/all_the_things.jpg")
#> Run `rlang::last_trace()` to see the full context.

rlang::last_trace()
#> <error/rlang_error>
#> All elements of `path` must exist
#> Backtrace:
#>     █
#>  1. └─pins::pin_upload(board, "~/Documents/all_the_things.jpg")

board |> pins::pin_upload(fs::path_expand("~/Documents/all_the_things.jpg"))
#> Guessing `name = 'all_the_things.jpg'`
#> Replacing version '20220110T114602Z-07164' with '20220110T114753Z-07164'
@github-actions
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant