Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poly test does not give non-zero exit code when check fails #177

Closed
svdo opened this issue Feb 1, 2022 · 1 comment
Closed

Poly test does not give non-zero exit code when check fails #177

svdo opened this issue Feb 1, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@svdo
Copy link

svdo commented Feb 1, 2022

Describe the bug
When running poly test, before running the tests it will also run the check command. If that fails, poly shows the messages and exits. The exit code however is zero, meaning that it claims that everything is OK. This is especially harmful in CI because it causes that the build succeeds while the tests are not even run.

To Reproduce
Steps to reproduce the behavior:

  1. Create an error in a polylith project; for example create a circular dependency or remove a required component from a project.
  2. In a bash-compatible shell, run poly check; echo "Exit code: $?" and notice that the error is printed correctly, and the exit code is 1 as expected.
  3. Now run poly test; echo "Exit code: $?" and notice that, while the error is printed, the exit code is 0.

Please note that the same happens when running clojure -M:poly instead of running poly from Homebrew.

Expected behavior
The error code should have been 1.

Operating System (please complete the following information):

  • OS: macOS
  • Version: 11.6.2

Versions (please complete the following information):

  • Java: openjdk version "17.0.1" 2021-10-19
  • Poly: 0.2.13-alpha (2021-10-12)
  • Brew: 3.3.9-80-g26694fd
@tengstrand tengstrand self-assigned this Feb 9, 2022
@tengstrand tengstrand added the bug Something isn't working label Feb 9, 2022
@tengstrand
Copy link
Collaborator

Hi!

Thanks for reporting this. I will have a look at this soon.

/Joakim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants