usethis icon indicating copy to clipboard operation
usethis copied to clipboard

`use_course()` does not open new folder in the file browser if run in positron

Open jennybc opened this issue 10 months ago • 4 comments

Reported by @cwickham

Note to self:

https://github.com/r-lib/usethis/blob/4aa55e72ccca131df2d98fcd84fff66724d6250a/R/course.R#L398-L409

and then

https://github.com/r-lib/usethis/blob/4aa55e72ccca131df2d98fcd84fff66724d6250a/R/rstudio.R#L133-L138

jennybc avatar Jun 04 '25 21:06 jennybc

This is what I ~see~ get when I copy and paste what I see in the Console:

Shall we delete the ZIP file
([posit-dev-positron-workshop-project-e3ff127.zip](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#))?

1: Nope
2: For sure
3: Not now

Selection: 
2
✔ Deleting
  [posit-dev-positron-workshop-project-e3ff127.zip](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#).
✔ Opening [posit-dev-positron-workshop-project-e3ff127/](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#)
  in the file manager.

Then nothing happens.

cwickham avatar Jun 04 '25 21:06 cwickham

Maybe it's as simple as browseURL() not working with files in Positron?

This works in RStudio but not Positron:

browseURL("file://Users/charlottewickham/Desktop/posit-dev-positron-workshop-project-e3ff127")

cwickham avatar Jun 04 '25 22:06 cwickham

It's probably this: https://github.com/posit-dev/positron/issues/5486

cwickham avatar Jun 04 '25 22:06 cwickham

Thanks for the additional research @cwickham! That looks promising. Or, rather, "promising".

jennybc avatar Jun 05 '25 15:06 jennybc

This is fixed by changes in Positron and ark, which are working their way through the system. In the glorious fullness of time (presumably the early August release), normal folks should reap the benefits.

jennybc avatar Jul 22 '25 18:07 jennybc