Skip to content

Commit

Permalink
Fix shell reporter running even when diff is empty (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcPer authored Feb 15, 2025
1 parent 30f143b commit e3b899c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/urlwatch/reporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,12 +1113,14 @@ class ShellReporter(TextReporter):
__kind__ = 'shell'

def submit(self):
text = '\n'.join(super().submit()) + '\n'
text = '\n'.join(super().submit())

if not text:
logger.debug('Not calling shell reporter (no changes)')
return

text = text + '\n'

cmd = self.config['command']

process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Expand Down

0 comments on commit e3b899c

Please sign in to comment.