Skip to content

Commit

Permalink
build: use BINDER_REQUEST instead of JUPYTERHUB_BASE_URL to determine…
Browse files Browse the repository at this point in the history
… whether env is in Binder
  • Loading branch information
annehaley authored and johnkit committed Apr 30, 2024
1 parent 9ed0161 commit bd9c5e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pan3d/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ async def coroutine():


def is_cloud_env():
cloud_env_keys = ["binder"]
jupyterhub_base_url = os.environ.get("JUPYTERHUB_BASE_URL")
return jupyterhub_base_url and any(k in jupyterhub_base_url for k in cloud_env_keys)
cloud_env_vars = ["BINDER_REQUEST"]
return any(os.environ.get(k) for k in cloud_env_vars)


initial_state = {
Expand Down

0 comments on commit bd9c5e2

Please sign in to comment.