Skip to content

Commit

Permalink
fix(runner): bug with no inputs (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocervell authored Nov 13, 2024
1 parent 5546b82 commit 4db7b46
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion secator/runners/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from secator.definitions import OPT_NOT_SUPPORTED, OPT_PIPE_INPUT
from secator.config import CONFIG
from secator.output_types import Error, Target, Stat
from secator.output_types import Info, Error, Target, Stat
from secator.runners import Runner
from secator.template import TemplateLoader
from secator.utils import debug
Expand Down Expand Up @@ -334,8 +334,14 @@ def yielder(self):
if self.has_children:
return

# Print task description
self.print_description()

# Abort if no inputs
if len(self.inputs) == 0 and self.skip_if_no_inputs:
yield Info(message=f'{self.unique_name} skipped (no inputs)', _source=self.unique_name, _uuid=str(uuid.uuid4()))
return

# Yield targets
for input in self.inputs:
yield Target(name=input, _source=self.unique_name, _uuid=str(uuid.uuid4()))
Expand Down

0 comments on commit 4db7b46

Please sign in to comment.