entropitor/dotenv-cli

Fail to load env

Closed this issue · 4 comments

base ❯ npx dotenv-cli -v FOO=bar -- echo $FOO

Which I am expecting to see bar there

Hi @entropitor,
I'm following your comment on #31 on macOS and still got empty result:

npx dotenv -v FOO=bar -p FOO
-> bar
npx dotenv -v FOO=bar -- bash -c 'echo $FOO'
-> (nothing)

Do you have any idea what could go wrong here? Thanks.

image

Seems to work for me 🤷 I guess something is pre-evaluating the $FOO... Are you putting this in npm scripts? Because that might be the issue.

Screen Shot 2022-08-30 at 4 13 09 PM

Strange, I believe I was doing exactly the same thing... or maybe my bash is problematic. Anyway, thanks for your quick response. I guess I'll try to work around in some other way and share what I find if any. Don't want to waste your time on this.