Use Site PHP Version to Run Composer Install (#218)

This commit is contained in:
Bernard Sarfo Twumasi 2024-05-22 08:37:16 +00:00 committed by GitHub
parent 2b849c888e
commit dd4a3d30c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ public function installDependencies(Site $site): void
$site->server->ssh()->exec(
$this->getScript('composer-install.sh', [
'path' => $site->path,
'php_version' => $site->php_version,
]),
'composer-install',
$site->id

View File

@ -2,6 +2,6 @@ if ! cd __path__; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev; then
if ! php__php_version__ /usr/local/bin/composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev; then
echo 'VITO_SSH_ERROR' && exit 1
fi