Skip to content

Commit

Permalink
respect launch_browser when passed as part of shiny_args
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Nov 17, 2016
1 parent 7e9ec8d commit 4872aab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rmarkdown
Type: Package
Title: Dynamic Documents for R
Version: 1.1.9016
Version: 1.1.9017
Authors@R: c(
person("JJ", "Allaire", role = c("aut", "cre"), email = "jj@rstudio.com"),
person("Joe", "Cheng", role = "aut", email = "joe@rstudio.com"),
Expand Down
5 changes: 4 additions & 1 deletion R/shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ run <- function(file = "index.Rmd", dir = dirname(file), default_file = NULL,

# launch the app and open a browser to the requested page, if one was
# specified
launch_browser <- (!is.null(file)) && interactive()
if (!is.null(shiny_args) && !is.null(shiny_args$launch_browser))
launch_browser <- shiny_args$launch_browser
else
launch_browser <- (!is.null(file)) && interactive()
if (isTRUE(launch_browser)) {
launch_browser <- function(url) {
url <- paste(url, file_rel, sep = "/")
Expand Down

0 comments on commit 4872aab

Please sign in to comment.