-
Notifications
You must be signed in to change notification settings - Fork 240
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
Copy tutorial folder to temp folder when calling run_tutorial
#347
Comments
Could this be as simple as passing Here's a commit that does that. For example, with
|
Actually this needs a bit more work in the intended environment (system library with unprivileged user).
I will try to clean it up and submit a PR if I can confirm it's working properly. |
Okay, I did get this to work as intended as an unprivileged user with
PR forthcoming with the patch, if you're open to it. Thanks in advance for considering. |
@bhogan-mitre Thank you for looking into this error! One thing that we will want to try to do is maintain the current save location as it will exist after R shuts down / computer restart. By always storing it as a temp file, then a lot of shiny-prerendered functionality is turned into a standard If we could check that we have write privileges in the expected location, we should leave the Rmd output as is. If we do not have write privileges, setting the output to a temp dir is a great solution. PRs are always welcome!! |
Hmmm, is it ever a good idea to write into a package library (other than, like, actually installing/updating/removing a package)? Seems wrong somehow! |
How is this coming along? (For now I suppose just ask students to install the tutorial-endowed package into their User Library and use |
@homerhanumat Unfortunately stalled for the moment. Update on approach: Use a cache disk location and copy the tutorial directory, then compile in there. Ex tutorial directory: Line 277 in 9dfe4a9
`rappdirs::user_data_dir()`/R/learnr/tutorial/package/learnr/hello/* This would allow for tutorial output to persist between R sessions and not build them in the installed folder. This cache folder could be checked for being able to write and could failover to the temp folder. |
Tutorials will not run when they are installed system-wide due to the fact that they are trying to write intermediate files to a read-only package directory. The latest source release fixes this by writing intermediate files to a temp directory. See also: rstudio/learnr#347
See rstudio/rstudio#6583
Paraphrasing...
cc @kevinushey @trestletech
The text was updated successfully, but these errors were encountered: