... or consider it as another fallback in paths.js.
I created a task in task scheduler that runs on system start and it happens to create pm2 files in c:/etc. For this, the user that runs the task must have elevated rights, which is neither necessary in all cases nor reasonable from a security point of view.
See here for some discussion about the topic regarding HOMEPATH vs USERPROFILE:
https://stackoverflow.com/questions/606483/what-is-the-meaning-of-these-windows-environment-variables-homedrive-homepath
Also, my application is successfully using os.homedir() which is another useful alternative.
... or consider it as another fallback in paths.js.
I created a task in task scheduler that runs on system start and it happens to create pm2 files in c:/etc. For this, the user that runs the task must have elevated rights, which is neither necessary in all cases nor reasonable from a security point of view.
See here for some discussion about the topic regarding HOMEPATH vs USERPROFILE:
https://stackoverflow.com/questions/606483/what-is-the-meaning-of-these-windows-environment-variables-homedrive-homepath
Also, my application is successfully using
os.homedir()which is another useful alternative.