Skip to content

Conversation

@schloerke
Copy link
Collaborator

Ex: SHINY_PORT is set by hosted environments and is inspected to determine if an app is being hosted.

Related: https://github.com/rstudio/shiny/blob/f55c26af4a0493b082d2967aca6d36b90795adf1/R/server.R#L510-L514

Useful for bookmarking to determine it's own inShinyServer() method

@schloerke schloerke requested a review from Copilot March 11, 2025 16:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR renames temporary environment variable names to avoid conflicts with local variable names used in hosted environments.

  • Renames SHINY_HOST and SHINY_PORT to SHINY_BROWSER_HOST and SHINY_BROWSER_PORT in the run_app function.
  • Updates the corresponding environment variable references in the browser launch logic to reflect the new naming.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
shiny/_main.py Renamed environment variable names to avoid conflict
shiny/_launchbrowser.py Updated references and error messages with new names

@schloerke schloerke enabled auto-merge (squash) March 11, 2025 16:44
@schloerke schloerke merged commit 65974e5 into main Mar 11, 2025
41 checks passed
@schloerke schloerke deleted the rename_shiny_port branch March 11, 2025 16:51
schloerke added a commit that referenced this pull request Mar 11, 2025
* main:
  chore: Use details for extra info from error message (#1903)
  ci: adds action to lint conventional commits (#1902)
  build: JS build script updates (#1894)
  chore: Rename temp environ names (for launching browser) to avoid conflict with local environ names (#1899)
  build: Update shiny TS types to Shiny 1.10.0 (#1893)
  chore: Use `shiny.module` to import re-exported values from `shiny._namespaces` (#1898)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants