Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
Franr committed Sep 21, 2024
1 parent 3951a46 commit 1b28ae3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions leverage/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(self, client, mounts: tuple = None, env_vars: dict = None):
raise Exit(1)

mounts = [Mount(source=source, target=target, type="bind") for source, target in mounts] if mounts else []
self.host_config = self.client.api.create_host_config(security_opt=["label:disable"], mounts=mounts)
self.host_config = self.client.api.create_host_config(security_opt=["label=disable"], mounts=mounts)
self.container_config = {
"image": f"{self.image}:{self.local_image_tag}",
"command": "",
Expand Down Expand Up @@ -343,7 +343,8 @@ def get_sso_code(self, container) -> str:
logs = self.docker_logs(container)
if "Then enter the code:" in logs:
return logs.split("Then enter the code:")[1].split("\n")[2]

else:
logger.debug(logs)
sleep(self.AWS_SSO_CODE_WAIT_SECONDS)

raise ExitError(1, "Get SSO code timed-out")
Expand All @@ -356,7 +357,7 @@ def get_sso_region(self):
def sso_login(self) -> int:
region = self.get_sso_region()

with CustomEntryPoint(self, ""):
with CustomEntryPoint(self, "sh -c"):
container = self._create_container(False, command=self.AWS_SSO_LOGIN_SCRIPT)

with ContainerSession(self.client, container):
Expand Down

0 comments on commit 1b28ae3

Please sign in to comment.