Fix for issue 2232: Many lines of "Could not find any stages to run" on run (#2272)
* Initial commit * Put the tests back * Remove unnecessary checks * Remove unneeded check and fix test code --------- Co-authored-by: Jason Song <i@wolfogre.com>
This commit is contained in:
@@ -479,6 +479,11 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
|
||||
log.Debugf("Planning jobs for event: %s", eventName)
|
||||
plan, plannerErr = planner.PlanEvent(eventName)
|
||||
}
|
||||
if plan != nil {
|
||||
if len(plan.Stages) == 0 {
|
||||
plannerErr = fmt.Errorf("Could not find any stages to run. View the valid jobs with `act --list`. Use `act --help` to find how to filter by Job ID/Workflow/Event Name")
|
||||
}
|
||||
}
|
||||
if plan == nil && plannerErr != nil {
|
||||
return plannerErr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user