From bb8d83f818d56abbbda05b818cc148f381bafc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20L=C3=B8vgaard?= Date: Fri, 4 Sep 2020 16:09:02 +0200 Subject: [PATCH] Add comment and remove $user since it was redundant --- src/task/cron.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/task/cron.php b/src/task/cron.php index 561d11c..ee2f9eb 100644 --- a/src/task/cron.php +++ b/src/task/cron.php @@ -29,9 +29,11 @@ 'stage' => get('stage'), ]; }); + +// If you're deploying as root you have the option to edit other users' crontabs +// So this parameters the user to the http_user if you're deploying as root else we don't set it set('cron_user', static function (): string { - $user = run('whoami'); - if ('root' !== $user) { + if ('root' !== run('whoami')) { return ''; }