equinor / komodoenv

Komodoenv is the virtualenv of the Komodo world
GNU General Public License v3.0
1 stars 3 forks source link

Should "out-of-date" komodoenv result in exit code 1? #46

Closed lars-petter-hauge closed 3 months ago

lars-petter-hauge commented 1 year ago

Given that your komodoenv becomes outdated, the sourcing will result in a sys.exit with a message letting you know you should update.

https://github.com/equinor/komodoenv/blob/b35f7824d8ebbe1c31c9b7d03af64a0fc32c0ee0/komodoenv/update.py#L412

Should this be an exit code of 1?

Use case where this can be challenging: running this as part of ERT will make the forward model job fail even before status's are reported back.

pinkwah commented 1 year ago

Yeah, it doesn't make sense to exit with code 1. We can instead print(..., file=sys.stderr) and sys.exit(0).