You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that despite the implementation, the Mix task does not appear to return a non-zero exit status when dangers are found. Here's an example:
» mix excellent_migrations.check_safety; echo$status
09:08:12.638 [warning] Index not concurrently in priv/repo/migrations/20230103220859_testing-stuff.exs:5
0
Note: Echo'd status is 0.
Solution
I'm not certain why this is an issue, but I'm guessing that perhaps System.stop(1) isn't behaving as expected with Mix? Perhaps there's another way to return non-zero status from Mix, such as raising an error after logging dangers, https://hexdocs.pm/mix/Mix.html#raise/2.
The text was updated successfully, but these errors were encountered:
Problem
I noticed that despite the implementation, the Mix task does not appear to return a non-zero exit status when dangers are found. Here's an example:
Note: Echo'd status is
0
.Solution
I'm not certain why this is an issue, but I'm guessing that perhaps
System.stop(1)
isn't behaving as expected with Mix? Perhaps there's another way to return non-zero status from Mix, such as raising an error after logging dangers, https://hexdocs.pm/mix/Mix.html#raise/2.The text was updated successfully, but these errors were encountered: