Skip to content

Commit

Permalink
revert to initial solution
Browse files Browse the repository at this point in the history
  • Loading branch information
aakrem committed May 13, 2024
1 parent e426e4d commit 0ba0470
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions agenta-cli/agenta/cli/variant_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ def add_variant(
)

if variant_name in config["variants"] and not overwrite:
overwrite_question = questionary.confirm(
"This variant already exists. Do you want to overwrite it?"
).ask()
if not overwrite_question:
click.echo("Operation cancelled.")
sys.exit(0)
if not overwrite:
overwrite = questionary.confirm(
"This variant already exists. Do you want to overwrite it?"
).ask()
if not overwrite:
click.echo("Operation cancelled.")
return

try:
click.echo(
Expand Down Expand Up @@ -445,7 +446,6 @@ def remove_variant_cli(variant_name: str, app_folder: str):
@click.option(
"--overwrite",
is_flag=True,
default=False,
help="Overwrite the existing variant if it exists",
)
@click.pass_context
Expand Down

0 comments on commit 0ba0470

Please sign in to comment.