diff --git a/sky/cli.py b/sky/cli.py index 5d4f07d535f..fdcfc146f07 100644 --- a/sky/cli.py +++ b/sky/cli.py @@ -2579,6 +2579,7 @@ def start( except (exceptions.NotSupportedError, exceptions.ClusterOwnerIdentityMismatchError) as e: click.echo(str(e)) + sys.exit(1) else: click.secho(f'Cluster {name} started.', fg='green') @@ -2918,6 +2919,7 @@ def _down_or_stop(name: str): except (exceptions.NotSupportedError, exceptions.ClusterNotUpError) as e: message = str(e) + sys.exit(1) else: # no exception raised success_progress = True message = (f'{colorama.Fore.GREEN}{operation} ' @@ -2948,6 +2950,7 @@ def _down_or_stop(name: str): except (exceptions.NotSupportedError, exceptions.ClusterOwnerIdentityMismatchError) as e: message = str(e) + sys.exit(1) else: # no exception raised message = ( f'{colorama.Fore.GREEN}{operation} cluster {name}...done.'