Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issues #173 and #192 with the 'Rake::Task#results' #420

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

karreiro
Copy link

@karreiro karreiro commented May 8, 2022

This PR fixes issues #173 and #192 by introducing the Rake::Task#results method.

We could also have the RakeTask#status or RakeTask#exit_status methods (and maybe keep #results private).

However, we would need to inspect the result of each task execution and adopt a convention for statuses. Thus, exposing #results seems a bit more flexible and permits this kind of use case:

task default: %w[test]

task :test do
  puts 'Testing...'
  :success
end
require "rake"

Rake.application.load_rakefile

task = Rake::Task[:test]

task.invoke

p task.results
# => [:success]

@karreiro
Copy link
Author

karreiro commented May 10, 2022

(I just rebased the branch to solve conflicts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant