Skip to content

DOC: Is return necessary after setFailed? #679

Description

@pllim

Hello. If I decide to use core.setFailed(...) but there are code after that runs if it did not fail, do I need to also add a return or does setFailed automatically terminates the Action? It is not clear from the README.

Example logic:

import*ascorefrom"@actions/core";asyncfunctionrun(){if(condition1){core.setFailed("You should not have done that");// Do I need return; here?}do_stuff_on_success();}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions