Mapped commands aren't re-mapped
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from capistrano/sshkit
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
capistrano/sshkit#563 · 6 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
capistrano/sshkit#562 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
capistrano/sshkit#554 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
capistrano/sshkit#543 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
capistrano/sshkit#518 · 1 comment ·
All issues in capistrano/sshkit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
riscv/riscv-unified-db#2626 ·
-
Component: GLib
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
ds-drift
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
we-promise/sure#3693 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
simp/pupmod-simp-simp#395 ·