easy-deploy-bundle
easy-deploy-bundle copied to clipboard
Custom composer command failing when executing 'which' on remote
Hello, I am trying to configure the deploy process, but I can't continue as composer command is failing.
I have a cPanel server, with several php versions. The composer command uses php5.6 as it is the default version, so if I want to execute composer with php7.2 I have to execute composer with the following command:
$ php -ea_php 72 /opt/cpanel/composer/bin/composer
Using this, composer will not show any error regarding php version being lower than 7 as it is being executed with the php7.2 version.
The problem is that if I configure this command with remoteComposerBinaryPath
the deploy process fails, as it tries to execut the which command:
return $this->getConfigBuilder()
->remoteComposerBinaryPath('php -ea_php 72 /opt/cpanel/composer/bin/composer');
In Process.php line 223:
The command "ssh ****@***** 'which php -ea_php 72 /opt/cpanel/composer/bin/composer'" failed.
Exit Code: 1(General error)
Working directory: /app
Output:
================
/usr/local/bin/php
/usr/bin/php
/opt/cpanel/composer/bin/composer
Error Output:
================
which: invalid option -- 'e'
which: invalid option -- '_'
which: invalid option -- 'p'
which: invalid option -- 'h'
which: invalid option -- 'p'
which: no 72 in (/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/bin:/usr/bin:/opt/cpanel/composer/bin)