Stream: beginners

Topic: ✔ CLI returning 1 on error


view this post on Zulip Martin Janiczek (Nov 05 2021 at 18:53):

Hello! I tried to do something like roc build ./Year2016Day20.roc && clear_term && ./year-2016-day-20 in my file watcher script, expecting the CLI to return 1 on error. As far as I understand, it instead compiles the program anyways after outputting the errors and returns 0.

Is there currently a way to find out if there were errors after running roc build ...?

view this post on Zulip Richard Feldman (Nov 05 2021 at 19:58):

I think roc check should return nonzero if there were errors!

view this post on Zulip Martin Janiczek (Nov 05 2021 at 19:59):

Oh, it does. I need to spend more time with roc --help it seems. Thanks!

view this post on Zulip Notification Bot (Nov 05 2021 at 19:59):

Martin Janiczek has marked this topic as resolved.

view this post on Zulip Martin Janiczek (Nov 05 2021 at 20:03):

I have to say this is pretty nice - roc check file.roc && roc build file.roc && clear_term && ./output :) vid.mp4


Last updated: Jul 06 2025 at 12:14 UTC