Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit edb8bd4

Browse files
authored
Merge pull request #10 from fd6130/patch
Use remotePhpBinaryPath when run composer
2 parents 3e321b9 + 49387dd commit edb8bd4

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/Deployer/DefaultDeployer.php

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,24 @@ private function doInstallDependencies(): void
349349
{
350350
if (true === $this->getConfig(Option::updateRemoteComposerBinary)) {
351351
$this->log('<h2>Self Updating the Composer binary</>');
352-
$this->runRemote(sprintf('%s self-update', $this->getConfig(Option::remoteComposerBinaryPath)));
352+
$this->runRemote(
353+
sprintf(
354+
'%s %s self-update',
355+
$this->getConfig(Option::remotePhpBinaryPath),
356+
$this->getConfig(Option::remoteComposerBinaryPath)
357+
)
358+
);
353359
}
354360

355361
$this->log('<h2>Installing Composer dependencies</>');
356-
$this->runRemote(sprintf('%s install %s', $this->getConfig(Option::remoteComposerBinaryPath), $this->getConfig(Option::composerInstallFlags)));
362+
$this->runRemote(
363+
sprintf(
364+
'%s %s install %s',
365+
$this->getConfig(Option::remotePhpBinaryPath),
366+
$this->getConfig(Option::remoteComposerBinaryPath),
367+
$this->getConfig(Option::composerInstallFlags)
368+
)
369+
);
357370
}
358371

359372
private function doInstallWebAssets(): void
@@ -402,7 +415,14 @@ private function doClearControllers(): void
402415
private function doOptimizeComposer(): void
403416
{
404417
$this->log('<h2>Optimizing Composer autoloader</>');
405-
$this->runRemote(sprintf('%s dump-autoload %s', $this->getConfig(Option::remoteComposerBinaryPath), $this->getConfig(Option::composerOptimizeFlags)));
418+
$this->runRemote(
419+
sprintf(
420+
'%s %s dump-autoload %s',
421+
$this->getConfig(Option::remotePhpBinaryPath),
422+
$this->getConfig(Option::remoteComposerBinaryPath),
423+
$this->getConfig(Option::composerOptimizeFlags)
424+
)
425+
);
406426
}
407427

408428
private function doCreateSymlink(): void

0 commit comments

Comments
 (0)