mirror of
https://github.com/getgrav/grav.git
synced 2026-02-28 09:31:32 +01:00
Fix failing example custom job. (#3050)
* Since Symfony 4.2 passing chained shell commands to the Process component is not supported anymore and a working directory needs to be set by passing it as a completely separate parameter. Unless somebody finds a way to use Process() for this and fixes it in the code, rework example custom job. Related info: https://symfony.com/blog/new-in-symfony-4-2-important-deprecations#deprecated-process-commands-as-strings * One more place to fix Symfony 4.2 compatibility.
This commit is contained in:
committed by
Matias Griese
parent
6273c2395d
commit
247d1a9aa6
@@ -39,12 +39,13 @@ form:
|
||||
.command:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.COMMAND
|
||||
placeholder: 'cd ~;ls -lah;'
|
||||
placeholder: 'ls'
|
||||
validate:
|
||||
required: true
|
||||
.args:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.EXTRA_ARGUMENTS
|
||||
placeholder: '-lah'
|
||||
.at:
|
||||
type: cron
|
||||
label: PLUGIN_ADMIN.SCHEDULER_RUNAT
|
||||
|
||||
@@ -298,7 +298,7 @@ class Scheduler
|
||||
*/
|
||||
public function isCrontabSetup()
|
||||
{
|
||||
$process = new Process('crontab -l');
|
||||
$process = new Process(['crontab', '-l']);
|
||||
$process->run();
|
||||
|
||||
if ($process->isSuccessful()) {
|
||||
|
||||
Reference in New Issue
Block a user