fix: Provide context around SHINY_PORT triggering Shiny Server warning (#4345)

* fix: Provide context around SHINY_PORT triggering Shiny Server warning

* `npm run build` (GitHub Actions)

* chore: Add comma

Co-authored-by: Barret Schloerke <barret@posit.co>

---------

Co-authored-by: gadenbuie <gadenbuie@users.noreply.github.com>
Co-authored-by: Barret Schloerke <barret@posit.co>
This commit is contained in:
Garrick Aden-Buie
2026-01-12 11:23:25 -05:00
committed by GitHub
parent ca259ab0f1
commit e161f2e4a8

View File

@@ -216,8 +216,14 @@ runApp <- function(
# any valid version.
ver <- Sys.getenv('SHINY_SERVER_VERSION')
if (utils::compareVersion(ver, .shinyServerMinVersion) < 0) {
warning('Shiny Server v', .shinyServerMinVersion,
' or later is required; please upgrade!')
rlang::warn(c(
sprintf(
"Shiny Server v%s or later is required; please upgrade.",
.shinyServerMinVersion
),
"i" = "If you are not using Shiny Server, you are likely seeing this message because the `SHINY_PORT` environment variable is set in your environment.",
"i" = "Avoid using `SHINY_PORT` to prevent this warning."
))
}
}