Skip to content

fix: Exit code not properly returned when using steps #760

@bvoq

Description

@bvoq

Is there an existing issue for this?

  • I have searched the existing issues.

Version

6.1.0

Description

Adding the following step will lead to a zero exit code, even when the test is supposed to fail.

scripts:
  test:
    steps:
      - melos exec -f --dir-exists=test -- flutter test

If you run melos test I would expect a non-zero exit code, however I get exit code 0.
However, if you run melos exec -f --dir-exists=test -- flutter test directly, you will get exit code 1.

Steps to reproduce

Add any failing test to your project.
Then add the above script to melos.yaml.
Then run melos test which should throw a non-zero exit code.

Expected behavior

I would expect a non-zero exit code but I get a zero exit code.

Screenshots

No response

Additional context and comments

This was tested on macOS but I don't think it's platform specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions