diff --git a/intake/crontab.py b/intake/crontab.py index 934a5c0..7d01691 100644 --- a/intake/crontab.py +++ b/intake/crontab.py @@ -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