Skip to content

Commit 707446d

Browse files
author
Itamar Junior
committed
Use system PHP path for artisan commands in update service
1 parent 7fc2c18 commit 707446d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/Services/System/SystemUpdateService.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ public function runUpdate(): SystemUpdate
2525
'status' => 'running',
2626
]);
2727

28+
$php = trim(shell_exec('which php')) ?: 'php';
2829
$commands = [
2930
'git fetch origin',
3031
'git reset --hard origin/main',
3132
'git clean -fd',
32-
'php artisan migrate',
33-
'php artisan optimize:clear',
34-
'php artisan queue:restart',
33+
"$php artisan migrate",
34+
"$php artisan optimize:clear",
35+
"$php artisan queue:restart",
3536
'npm install',
3637
'npm run build',
3738
];

0 commit comments

Comments
 (0)