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

build in non interactive mode #647

Closed
merliseclyde opened this issue May 1, 2018 · 2 comments
Closed

build in non interactive mode #647

merliseclyde opened this issue May 1, 2018 · 2 comments

Comments

@merliseclyde
Copy link

@merliseclyde merliseclyde commented May 1, 2018

It would be useful for build_site() to have the option to run in a non-interactive R mode but in the terminal. Currently, example code that creates multiple plots where the default in the code is ask=TRUE or shiny apps that should run only if in an interactive environment. i.e.

if (interactive()) run_my_shiny_app()

wait for user input. In the case of plots, the build continues (love having the plots in the example output!!!), however with shiny apps, the build stops and no additional Rd files are processed. The shiny apps could be added to a \dontrun block, but I am currently being asked to use \donttest rather than \dontrun for submission to CRAN. Testing for an interactive environment would avoid using either \dontrun or \donttest with the function documentation avoiding the confusing # NOT RUN wrapper).

@hadley
Copy link
Member

@hadley hadley commented May 22, 2018

This is the point of the RStudio add-in, which runs in a separate process. Maybe this should be an exported function?

@merliseclyde
Copy link
Author

@merliseclyde merliseclyde commented May 23, 2018

Thanks that works - did not realize that the add-in would run in non-interactive mode. Exporting or documenting would be nice. Thanks!

@hadley hadley added this to the pkgdown 1.1.0 milestone May 29, 2018
jayhesselberth added a commit that referenced this issue May 29, 2018
hadley added a commit that referenced this issue May 31, 2018
Which runs build_site(new_process = FALSE) in a new process

Fixes #647
hadley added a commit that referenced this issue May 31, 2018
Which runs build_site(new_process = FALSE) in a new process

Fixes #647
@hadley hadley added the wip label May 31, 2018
@hadley hadley closed this in 936c6f9 Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants