Skip to content

Commit 12c9405

Browse files
authored
Merge pull request rstudio#1790 from rstudio/wch-warn-level
Don't reduce warn level when running app
2 parents 4cb428b + 4708b44 commit 12c9405

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ shiny 1.0.3.9001
4545

4646
* Fixed [#1763](https://github.com/rstudio/shiny/issues/1763): Shiny's private random stream leaked out into the main random stream. ([#1768](https://github.com/rstudio/shiny/pull/1768))
4747

48+
* Fixed [#1680](https://github.com/rstudio/shiny/issues/1680): `options(warn=2)` was not respected when running an app. ([#1790](https://github.com/rstudio/shiny/pull/1790))
49+
4850
### Library updates
4951

5052

R/server.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,11 @@ runApp <- function(appDir=getwd(),
577577

578578
# Make warnings print immediately
579579
# Set pool.scheduler to support pool package
580-
ops <- options(warn = 1, pool.scheduler = scheduleTask)
580+
ops <- options(
581+
# Raise warn level to 1, but don't lower it
582+
warn = max(1, getOption("warn", default = 1)),
583+
pool.scheduler = scheduleTask
584+
)
581585
on.exit(options(ops), add = TRUE)
582586

583587
appParts <- as.shiny.appobj(appDir)

0 commit comments

Comments
 (0)