Hey there, thanks for creating this gem 🙇
I've run into an issue when following the instructions in the README as the shared_path is not necessarily set correctly when you define the command mapping in the top-level scope.
Instead, what worked for me was to defer the mapping until after deploy:starting, where we can be sure the shared_path is initialized to the correct value:
namespace :deploy do
# Add command mappings
after :starting, :map_commands do
SSHKit.config.command_map[:composer] = "php #{shared_path.join('composer.phar')}"
end
# Install composer (https://getcomposer.org/)
after :starting, 'composer:install_executable'
# …
end
Maybe it'd make sense to update the README and composer:install_executable task description?
Hey there, thanks for creating this gem 🙇
I've run into an issue when following the instructions in the README as the
shared_pathis not necessarily set correctly when you define the command mapping in the top-level scope.Instead, what worked for me was to defer the mapping until after
deploy:starting, where we can be sure theshared_pathis initialized to the correct value:Maybe it'd make sense to update the README and
composer:install_executabletask description?