Closed dverkade closed 4 years ago
I think what you're looking for is the command map functionality in SSH Kit: https://github.com/capistrano/sshkit#the-command-map
An example of it being used can actually be found in this gem's code to set the command used whenever execute :magento
is called:
SSHKit.config.command_map[:magento] = "/usr/bin/env php -f bin/magento --"
Reference: https://github.com/davidalger/capistrano-magento2/blob/master/lib/capistrano/magento2.rb#L12
I believe that by default SSH Kit will use something like /usr/bin/env <command>
respecting the $PATH
(which may be different in the Capistrano context compared to the login shell one gets when SSH'ing in with a prompt)
HTH!
Thanks @davidalger , that did the trick!
Is there a way to change the default path of Composer? I'm setting
set :composer, '/usr/local/php73/bin/php73 /usr/local/bin/composer'
in my deploy.rb file, but it does not look like that is being picked up.