Skip to content

Commit

Permalink
[CU-86b2kx0tp] changed return to exit(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianning-zhang committed Oct 28, 2024
1 parent 7712026 commit 8a1902b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dnastack/cli/workbench/storage_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def add_aws_storage_account(context: Optional[str],
# Validate bucket format
if not re.match(r'^s3://', bucket):
click.echo(style("Error: Bucket name must start with 's3://'", fg='red'), err=True, color=True)
return
exit(1)

"""Create a new aws storage account"""
client = get_storage_client(context, endpoint_id, namespace)
Expand Down Expand Up @@ -320,7 +320,7 @@ def add_platform(context: Optional[str],
# Validate path format
if re.match(r'^s3://', path):
click.echo(style("Error: Path must not start with 's3://'", fg='red'), err=True, color=True)
return
exit(1)

# Prefix path with a forward slash if not already present
if path and not path.startswith('/'):
Expand Down

0 comments on commit 8a1902b

Please sign in to comment.