capistrano / capistrano/composer
Command mapping
- Dominant language
- Ruby
- Stars
- 182
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
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:
```ruby
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.