Closed zsiegel92 closed 1 month ago
This is not a tsx bug—it doesn't implement this feature. All unrecognized flags are just relayed to the underlying node
command to handle.
I also can't reproduce with the latest Node:
$ tsx --env-file=.env ./test.ts
right
$ node -v
v22.9.0
But you're likely encountering https://github.com/nodejs/node/issues/52084
Acknowledgements
Minimal reproduction URL
https://github.com/zsiegel92/tsx_env_var_bug_mwe
Problem & expected behavior (under 200 words)
The
.env
file in the MWE repo looks like this:Using
npx tsx --env-file .env test.ts
, the commented-out wrong variable is set during execution rather than the correct one. The conditions for this are:Bugs are expected to be fixed by those affected by it
Compensating engineering work will speed up resolution and support the project