--dry-run (or -n) doesn't seem to trigger `when_writing`
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.5k
- Forks
- 650
- Avg merge
- 6m
- Merged PRs (30d)
- 3
Description
Given the following rakefile
task "git_diff_rails_credentials:fix" do
when_writing "set local git-config diff.rails_credentials" do
sh "git config diff.rails_credentials.textconv 'bin/rails credentials:diff'"
end
end
When I run rake -n git_diff_rails_credentials:fix
I expect to see DRYRUN: set local git-config diff.rails_credentials in the output. But instead I see:
$ rake -n doctor:git_diff_rails_credentials:fix
** Invoke doctor:git_diff_rails_credentials:fix (first_time)
** Execute (dry run) doctor:git_diff_rails_credentials:fix
I assume this is related to #361 but there isn't any resolution there to indicate what the expectations are.
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.
Research direction
Start by tracing the when_writing entry point and the --dry-run execution path described in the issue. Reproduce the rake command and compare its output with the expected DRYRUN: set local git-config diff.rails_credentials line; done means the dry run reports the when_writing action without applying it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100