Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Mapped commands aren't re-mapped

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
devops

Research direction

No file or test is named in the issue. Start by locating how SSHKit.config.command_map is implemented and where mapped commands are expanded; determine how nested mappings should behave, then verify that a command such as bundle exec rake re-expands consistently without breaking existing mappings.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Ruby
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from capistrano/sshkit

All issues in capistrano/sshkit

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.