deno-cliffy icon indicating copy to clipboard operation
deno-cliffy copied to clipboard

Enable customization of exit code for `required` env var

Open johnstonmatt opened this issue 1 year ago • 2 comments

We @polyseam are happy users of Cliffy!

The .env() method is useful for denoting environment variables as "required" and providing nice error messages, but it always exits with the status code 1 and there is no way to set a more descriptive code so that users can more easily find relevant support material. This is made worse because 1 is also the default exit code by everyone else so it is quite overloaded.

I created a repo to demonstrate the above at johnstonmatt/required-env-demo.

Thanks for all your hard work on cliffy!

johnstonmatt avatar May 15 '23 23:05 johnstonmatt