Skip to content

Navigation Menu

Sign up

How to get exit status of the rake task using rake API #546

Unanswered
saraniyadev asked this question in Q&A
Discussion options

Is their a possibility to get the exit status of a rake task when executed inside a ruby script.

My config rake method looks like below

desc "Run serverspec to #{host}"
 RSpec::Core::RakeTask.new(host) do |t|
 ENV['TARGET_HOST'] = host
 t.pattern = "spec/cfengine3/*_spec.rb"
 end

My run methods contains below code

Rake.application.init
Rake.application.top_level

I am not able to get exit status of my rake task invoked by top_level

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #173 on March 15, 2024 00:47.

AltStyle によって変換されたページ (->オリジナル) /