Skip to content

Commit

Permalink
#992 Use 'php' shell command for update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
j3nsch committed Aug 26, 2024
1 parent 8edba7e commit 3dd354b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion library/Application/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ class Application_Update extends Application_Update_PluginAbstract
*/
private $confirmSteps = false;

/**
* Shell command for executing scripts.
*/
private $shellCommand = 'php';

/**
* Bootstrap Zend_Application for update process.
*/
Expand Down Expand Up @@ -205,7 +210,9 @@ public function runScript($script)

$this->log("Running '$basename' ... ");

passthru($script, $exitCode);
$shellCommand = $this->getShellCommand();

passthru("{$shellCommand} {$script}", $exitCode);

if ($exitCode !== 0) {
$message = "Error ($exitCode) running '$basename'!";
Expand Down Expand Up @@ -332,4 +339,12 @@ public function getConfirmSteps()
{
return $this->confirmSteps;
}

/**
* @return string
*/
public function getShellCommand()
{
return $this->shellCommand;
}
}

0 comments on commit 3dd354b

Please sign in to comment.