Skip to content

Commit

Permalink
Manage env vars and fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
agahkarakuzu committed Sep 7, 2024
1 parent 910edb2 commit 6583faf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions myst_libre/builders/myst_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def __init__(self, hub):
"port":f"{self.hub.port}"
}
self.myst_client = MystMD(hub.rees.build_dir, self.env_vars)

def setenv(self,key,value):
self.env_vars[key] = value

def build(self):
self.cprint(f'Starting MyST build {self.hub.jh_url}','yellow')
Expand Down
4 changes: 2 additions & 2 deletions myst_libre/tools/jupyter_hub_local_spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def spawn_jupyter_hub(self):
self.jh_token = h.hexdigest()

if not self.rees.search_img_by_repo_name():
raise Exception(f"[ERROR] A docker image has not been found for {self.rees.gh_user_repo_name} at {self.binder_image_tag}.")
raise Exception(f"[ERROR] A docker image has not been found for {self.rees.gh_user_repo_name} at {self.rees.binder_image_tag}.")
if self.rees.binder_image_tag not in self.rees.found_image_tags:
raise Exception(f"[ERROR] A docker image exists for {self.rees.gh_user_repo_name}, yet the tag {self.binder_image_tag} is missing.")
raise Exception(f"[ERROR] A docker image exists for {self.rees.gh_user_repo_name}, yet the tag {self.rees.binder_image_tag} is missing.")

# self.rees.found_image_name is assigned if above not fails

Expand Down

0 comments on commit 6583faf

Please sign in to comment.