Skip to content

Commit

Permalink
Fixed non zero code returned from the crontab -l command
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Sep 5, 2020
1 parent 3bbc982 commit fa48cda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/task/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
task('cron:download', static function (): void {
$cronUser = get('cron_user');

run(sprintf('crontab -l%s 2>/dev/null > existing_crontab.txt', $cronUser !== '' ? (' -u ' . $cronUser) : ''));
run(sprintf('(crontab -l%s 2>/dev/null || true) > existing_crontab.txt', $cronUser !== '' ? (' -u ' . $cronUser) : ''));
download('existing_crontab.txt', 'existing_crontab.txt');
})->desc('Downloads existing crontab to existing_crontab.txt file');

Expand Down

0 comments on commit fa48cda

Please sign in to comment.