Fix crontab on systems without crontab

This commit is contained in:
Tim Van Baak 2024-11-06 18:32:11 -08:00
parent 256a52e902
commit 9bb331941f
1 changed files with 2 additions and 2 deletions

View File

@ -30,8 +30,8 @@ def update_crontab_entries(data_path: Path):
# If there is no crontab command available, quit early. # If there is no crontab command available, quit early.
cmd = ("command", "-v", "crontab") cmd = ("command", "-v", "crontab")
print("Executing", *cmd, file=sys.stderr) print("Executing", *cmd, file=sys.stderr)
crontab_exists = subprocess.run(cmd, shell=True) crontab_exists = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE)
if crontab_exists.returncode: if not crontab_exists.stdout:
print("Could not update crontab", file=sys.stderr) print("Could not update crontab", file=sys.stderr)
return return