Skip to content

Commit

Permalink
Fix an error for rake prof:slow_cops
Browse files Browse the repository at this point in the history
This commit fixes the following error for `rake prof:slow_cops`
when tmp/stackprof.dump does not exist.

```console
% bundle exec rake prof:slow_cops
rake aborted!
Don't know how to build task 'run' (See the list of available tasks with `rake --tasks`)
tasks/prof.rake:22:in `block (2 levels) in <top (required)>'
/Users/koic/.rbenv/versions/3.2.0-dev/bin/bundle:25:in `load'
/Users/koic/.rbenv/versions/3.2.0-dev/bin/bundle:25:in `<main>'
Tasks: TOP => prof:slow_cops => prof:run_if_needed
(See full trace by running task with --trace)
```
  • Loading branch information
koic committed Sep 1, 2022
1 parent 65cec7c commit 2fb4c3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/prof.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace :prof do

desc 'Run RuboCop on itself only if dump does not exist'
task :run_if_needed, [:path] do
Rake::Task[:run].run unless File.exist?(dump_path)
Rake::Task['prof:run'].invoke unless File.exist?(dump_path)
end

desc 'List the slowest cops'
Expand Down

0 comments on commit 2fb4c3c

Please sign in to comment.