Skip to content

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

Description

@saraniyadev

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

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