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.
|
# 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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue