FIX: Added return statement if invalid PATH in cron job creation

This commit is contained in:
Álvaro Leiva 2025-04-01 10:08:47 +02:00
parent 395617fe40
commit d35a895df6

View file

@ -91,6 +91,7 @@ def create_cron_job(cron_job: str, config_file: Path):
print( print(
f"No executable found, please add this to your crontab manually: '/path/to/adgroupsync --conf {config_file} >/dev/null 2>&1'" f"No executable found, please add this to your crontab manually: '/path/to/adgroupsync --conf {config_file} >/dev/null 2>&1'"
) )
return
# Checking if the string is valid # Checking if the string is valid
if not CronSlices.is_valid(cron_job): if not CronSlices.is_valid(cron_job):