Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/41'
Browse files Browse the repository at this point in the history
* origin/pr/41:
  Support 'state.apply' in addition to 'state.highstate'
  • Loading branch information
marmarek committed Jan 29, 2024
2 parents 3b583c1 + 60c1ad6 commit e2a257a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion qubessalt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,14 @@ def has_config(vm):


def run_one(vmname, command, show_output, force_color, skip_top_check):
if not skip_top_check and 'state.highstate' in command:
uses_top = False
if 'state.highstate' in command:
uses_top = True
# there could be some options after, but lean on the safe side - better
# just disable optimization than skip some state to apply
if command[-1] == 'state.apply':
uses_top = True
if not skip_top_check and uses_top:
try:
if not has_config(vmname):
return vmname, 0, "SKIP (nothing to do)"
Expand Down

0 comments on commit e2a257a

Please sign in to comment.