Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom composer command failing when executing 'which' on remote #83

Open
davidrojo opened this issue Nov 29, 2018 · 0 comments
Open

Custom composer command failing when executing 'which' on remote #83

davidrojo opened this issue Nov 29, 2018 · 0 comments

Comments

@davidrojo
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant