Skip to content

Commit

Permalink
Use remotePhpBinaryPath when run composer
Browse files Browse the repository at this point in the history
  • Loading branch information
fd6130 committed Nov 12, 2021
1 parent 3e321b9 commit 49387dd
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions src/Deployer/DefaultDeployer.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,24 @@ private function doInstallDependencies(): void
{
if (true === $this->getConfig(Option::updateRemoteComposerBinary)) {
$this->log('<h2>Self Updating the Composer binary</>');
$this->runRemote(sprintf('%s self-update', $this->getConfig(Option::remoteComposerBinaryPath)));
$this->runRemote(
sprintf(
'%s %s self-update',
$this->getConfig(Option::remotePhpBinaryPath),
$this->getConfig(Option::remoteComposerBinaryPath)
)
);
}

$this->log('<h2>Installing Composer dependencies</>');
$this->runRemote(sprintf('%s install %s', $this->getConfig(Option::remoteComposerBinaryPath), $this->getConfig(Option::composerInstallFlags)));
$this->runRemote(
sprintf(
'%s %s install %s',
$this->getConfig(Option::remotePhpBinaryPath),
$this->getConfig(Option::remoteComposerBinaryPath),
$this->getConfig(Option::composerInstallFlags)
)
);
}

private function doInstallWebAssets(): void
Expand Down Expand Up @@ -402,7 +415,14 @@ private function doClearControllers(): void
private function doOptimizeComposer(): void
{
$this->log('<h2>Optimizing Composer autoloader</>');
$this->runRemote(sprintf('%s dump-autoload %s', $this->getConfig(Option::remoteComposerBinaryPath), $this->getConfig(Option::composerOptimizeFlags)));
$this->runRemote(
sprintf(
'%s %s dump-autoload %s',
$this->getConfig(Option::remotePhpBinaryPath),
$this->getConfig(Option::remoteComposerBinaryPath),
$this->getConfig(Option::composerOptimizeFlags)
)
);
}

private function doCreateSymlink(): void
Expand Down

0 comments on commit 49387dd

Please sign in to comment.