capistrano / capistrano/sshkit
Mapped commands aren't re-mapped
- Dominant language
- Ruby
- Stars
- 1.2k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
Ran into a weird one today, I had something like:
``` rub
SSHKit.config.command_map[:rake] = "/usr/local/rbenv/shims/bundle exec rake"
SSHKit.config.command_map[:ruby] = "/usr/local/rbenv/shims/ruby"
```
I had a problem with `Rake x.x.x is already activated, bundle exec might help` so I tried mapping:
```
SSHKit.config.command_map[:bundle] = "/usr/local/rbenv/shims/bundle"
```
Then I realised it would have been nice to be able to have have mapped:
```
SSHKit.config.command_map[:rake] = "bundle exec rake"
```
and have the `bundle` part of that be _somehow_ re-expanded.
In the end I worked around by using:
``` ruby
SSHKit.config.command_map[:bundle] = "/usr/local/rbenv/shims/bundle"
SSHKit.config.command_map[:rake] = "/usr/local/rbenv/shims/bundle exec rake"
SSHKit.config.command_map[:ruby] = "/usr/local/rbenv/shims/ruby"
```
Which is still absolutely OK, but weird that I never thought of this when designing the command map.
Contributor guide
Assessment
This issue has not been assessed yet.