diff --git a/shiny/_launchbrowser.py b/shiny/_launchbrowser.py index 8c6944edd..7e828be55 100644 --- a/shiny/_launchbrowser.py +++ b/shiny/_launchbrowser.py @@ -27,14 +27,14 @@ def emit(self, record: logging.LogRecord) -> None: if "Application startup complete." in record.getMessage(): self._launched = True - port = os.environ["SHINY_PORT"] + port = os.environ["SHINY_BROWSER_PORT"] if not port.isnumeric(): print( - "SHINY_PORT environment variable not set or unusable; " + "SHINY_BROWSER_PORT environment variable not set or unusable; " "--launch-browser will be ignored" ) # For some reason the shiny port isn't set correctly!? return - host = os.environ["SHINY_HOST"] + host = os.environ["SHINY_BROWSER_HOST"] url = get_proxy_url(f"http://{host}:{port}/") webbrowser.open(url, 1) diff --git a/shiny/_main.py b/shiny/_main.py index 2f7ac632e..0c5a37b9d 100644 --- a/shiny/_main.py +++ b/shiny/_main.py @@ -295,8 +295,8 @@ def run_app( if port == 0: port = _utils.random_port(host=host) - os.environ["SHINY_HOST"] = host - os.environ["SHINY_PORT"] = str(port) + os.environ["SHINY_BROWSER_HOST"] = host + os.environ["SHINY_BROWSER_PORT"] = str(port) if dev_mode: os.environ["SHINY_DEV_MODE"] = "1"