Skip to content

Commit 373ff53

Browse files
fix(operations/crontab): only provide command if cron_name is not provided
1 parent 73cc854 commit 373ff53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyinfra/operations/crontab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def comma_sep(value):
8484
ctb = ctb0
8585
name_comment = "# pyinfra-name={0}".format(cron_name)
8686

87-
existing_crontab = ctb.get_command(command=command, name=cron_name)
87+
existing_crontab = ctb.get_command(command=[command if cron_name is None else None], name=cron_name)
8888
existing_crontab_command = existing_crontab["command"] if existing_crontab else command
8989
existing_crontab_match = existing_crontab["command"] if existing_crontab else command
9090

0 commit comments

Comments
 (0)