invertase / melos

🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
https://melos.invertase.dev/~melos-latest
Apache License 2.0
1.19k stars 206 forks source link

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

Open bvoq opened 2 months ago

bvoq commented 2 months ago

Is there an existing issue for this?

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.

spydon commented 2 months ago

This is a duplicate of https://github.com/invertase/melos/issues/527 Which you also commented on...

bvoq commented 2 months ago

This is a duplicate of #527 Which you also commented on...

Ok thanks, I wasn't sure if I needed to file a new issue. Thanks for maintaining this cool tool :-)

spydon commented 2 months ago

Ah, this is actually not a duplicate, I'm re-opening this one.

spydon commented 2 months ago

@jessicatarra could you maybe have a look at this one? :)

Isakdl commented 3 days ago

I ran into this today, any updates?

spydon commented 3 days ago

I ran into this today, any updates?

No updates, but we're open to PRs!