Description
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
Hello! Recently I was doing some housekeeping in my projects and one of them is using nest-commander
.
The project is about a simple CLI to interact with OpenSearch in a convenient way.
When running the CLI will leverage @nestjs/config
in order to check a couple of ENV variables. If the variable is expected and not set the code will throw a ConfigException
.
As you can see from the attached screenshot I can see the log about the error

but the throw seems somehow ignored

It wont happen in regular nestjs projects

Minimum reproduction code
You can just download and run my project:
git clone [email protected]:andreafspeziale/os-cli.git
cd os-cli
pnpm i
pnpm build
At this point all CLI commands should throw since expected env is missing, you can run whatever like
node dist/os-cli.js
Expected behavior
The thrown error to be reported
Package
-
nest-commander
-
nest-commander-schematics
-
nest-commander-testing
Package version
3.16.1
Node.js version
v22.14.0
In which operating systems have you tested?
- macOS
- Windows
- Linux
Other
You can chat me on X or Discord (added u) to check it out together if needed. Thank you for your help and work 🙏