process: check env->EmitProcessEnvWarning() last
Calling env->EmitProcessEnvWarning() prevents additional warnings from being set it should therefore be called only if a warning will emit.
Split this work out from https://github.com/nodejs/node/pull/25157, addressing @joyeecheung's concerns.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines