Fix crontab on systems without crontab
This commit is contained in:
parent
256a52e902
commit
9bb331941f
@ -30,8 +30,8 @@ def update_crontab_entries(data_path: Path):
|
||||
# If there is no crontab command available, quit early.
|
||||
cmd = ("command", "-v", "crontab")
|
||||
print("Executing", *cmd, file=sys.stderr)
|
||||
crontab_exists = subprocess.run(cmd, shell=True)
|
||||
if crontab_exists.returncode:
|
||||
crontab_exists = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE)
|
||||
if not crontab_exists.stdout:
|
||||
print("Could not update crontab", file=sys.stderr)
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user