Skip to content

Commit 65974e5

Browse files
authored
chore: Rename temp environ names (for launching browser) to avoid conflict with local environ names (#1899)
1 parent 4245ebe commit 65974e5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

shiny/_launchbrowser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ def emit(self, record: logging.LogRecord) -> None:
2727

2828
if "Application startup complete." in record.getMessage():
2929
self._launched = True
30-
port = os.environ["SHINY_PORT"]
30+
port = os.environ["SHINY_BROWSER_PORT"]
3131
if not port.isnumeric():
3232
print(
33-
"SHINY_PORT environment variable not set or unusable; "
33+
"SHINY_BROWSER_PORT environment variable not set or unusable; "
3434
"--launch-browser will be ignored"
3535
)
3636
# For some reason the shiny port isn't set correctly!?
3737
return
38-
host = os.environ["SHINY_HOST"]
38+
host = os.environ["SHINY_BROWSER_HOST"]
3939
url = get_proxy_url(f"http://{host}:{port}/")
4040
webbrowser.open(url, 1)

shiny/_main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ def run_app(
295295
if port == 0:
296296
port = _utils.random_port(host=host)
297297

298-
os.environ["SHINY_HOST"] = host
299-
os.environ["SHINY_PORT"] = str(port)
298+
os.environ["SHINY_BROWSER_HOST"] = host
299+
os.environ["SHINY_BROWSER_PORT"] = str(port)
300300
if dev_mode:
301301
os.environ["SHINY_DEV_MODE"] = "1"
302302

0 commit comments

Comments
 (0)