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

Nested "on" blocks should raise or warn

Open
#352 4 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
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
devops

Research direction

Start by reproducing the nested on block behavior described in the issue and inspect how the SSHKit DSL handles nested calls. Done means nested on blocks no longer proceed silently and instead consistently raise or warn, with the chosen behavior reflected in tests.

Written by the indexing model from the issue text.

Description

discuss! enhancement help wanted

From https://github.com/capistrano/sshkit/issues/348#issuecomment-220160838

AFAIK nested on blocks were never considered in the design. The fact that it works at all is really just coincidence, due to how the SSHKit DSL is mixed into all objects. IMO it should raise an exception. You can open an SSHKit issue.

My personal opinion is that we should actually support it (take intersection of all role sets in the call stack), but until then, we should raise or warn when we find a nested on blocks.

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.