microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.46k stars 235 forks source link

The system environment variables obtained are different #488

Closed zhangbaojia closed 3 years ago

zhangbaojia commented 3 years ago

Environment details

Issue description

I tried running electron in the example;

The source code to run:

20210811150806

Then it can be packaged and run(electron-builder):

20210811150759

The environment variables obtained above are surprisingly different.

zhangbaojia commented 3 years ago

20210811163824

Now i know !

zhangbaojia commented 3 years ago

I have questions:

I'm doing the same thing(source code to run and build to run), Encounter coding problems:

20210811182409

20210811182416

Tyriar commented 3 years ago

That's probably the $LANG environment variable? Diffing env in each terminal should help