Skip to content

Commit

Permalink
fix: do not ask question on skipped steps (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
skatsaounis authored Aug 27, 2024
1 parent 9f85390 commit fa28f11
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions anvil-python/anvil/commands/haproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from sunbeam.clusterd.client import Client
from sunbeam.commands.terraform import TerraformInitStep
from sunbeam.jobs import questions
from sunbeam.jobs.common import BaseStep
from sunbeam.jobs.common import BaseStep, ResultType
from sunbeam.jobs.juju import JujuHelper
from sunbeam.jobs.steps import (
AddMachineUnitsStep,
Expand Down Expand Up @@ -106,7 +106,11 @@ def has_prompts(self) -> bool:
if self.refresh:
return False

return True
skip_result = self.is_skip()
if skip_result.result_type == ResultType.SKIPPED:
return False
else:
return True

def prompt(self, console: Console | None = None) -> None:
variables = questions.load_answers(
Expand Down
6 changes: 5 additions & 1 deletion anvil-python/anvil/commands/postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ def has_prompts(self) -> bool:
if self.refresh:
return False

return True
skip_result = self.is_skip()
if skip_result.result_type == ResultType.SKIPPED:
return False
else:
return True


class ReapplyPostgreSQLTerraformPlanStep(DeployMachineApplicationStep):
Expand Down

0 comments on commit fa28f11

Please sign in to comment.