Closed eabrouwer3 closed 1 year ago
Would you like to create a PR for this issue?
I can give it a go.
Ok, I've put a code change in a PR (#2244). Would love some help to determine if it's a breaking change and what documentation or tests need to be updated.
Let's track this here https://github.com/nestjs/nest-cli/pull/2244
Is there an existing issue for this?
Current behavior
I'm using
nest-commander
, but this isn't an issue with them. There's two options to run the CLI command with the JSON argument, and when I build the project and then run it, I don't get any issues. When I run withnest start
however, I get an error because there's something that happens during that command.Option 1 (No Error)
Option 2 (Error!)
Basically, when using
nest start
to run the command, the JSON string'{"foo": "bar"}'
is parsed, and then sent through without the string delimiters. I've tried a few different ways to get it to get passed through nicely, none of which have worked. They all yield the same exact error.'{"foo": "bar"}'
"{\"foo\": \"bar\"}"
{\"foo\":\ \"bar\"}
Minimum reproduction code
https://github.com/eabrouwer3/nest-json-option-repro
Steps to reproduce
No response
Expected behavior
Both ways of running the code should yield the same result.
Package version
10.1.11
NestJS version
10.1.3
Node.js version
v18.16.1
In which operating systems have you tested?
Other
No response