sshkit icon indicating copy to clipboard operation
sshkit copied to clipboard

Mapped commands aren't re-mapped

Open leehambley opened this issue 12 years ago • 0 comments

Ran into a weird one today, I had something like:

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:

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.

leehambley avatar Jan 26 '13 11:01 leehambley