Skip to content

Commit

Permalink
Fixed bug in relaunching deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogsilva committed Nov 27, 2024
1 parent 3f1b0a5 commit 9ff3674
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions deployments/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,10 @@ class _RelaunchDeploymentScript:

def handle(self) -> None:
call_args = self.original_call_args[:]
# prevent infinite loops by ensuring we set the --no-auto-update flag
if call_args.index(_DO_NOT_UPDATE_FLAG_NAME) == -1:
try:
call_args.index(_DO_NOT_UPDATE_FLAG_NAME)
except ValueError:
# prevent infinite loops by ensuring we set the --no-auto-update flag
call_args.append(_DO_NOT_UPDATE_FLAG_NAME)
os.execv(sys.executable, call_args)

Expand Down

0 comments on commit 9ff3674

Please sign in to comment.