Skip to content

--dry-run (or -n) doesn't seem to trigger when_writing #691

@jasonkarns

Description

@jasonkarns

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions