I’ve noticed a quirk when running npm scripts via Git Bash on Windows 10. Namely, the value of my HOME variable changes for commands called via npm, as opposed to direct from the shell:
$ env |grep ^HOME=
$ npm run env |grep ^HOME=
This is creating some headaches, because in I’m running scripts which depend on Git and ssh configuration, which are expected to live under $HOME. Does anyone know why this occurs, and/or how to change it?
For now, I’m working around it by maintaining the configs under both HOME paths, but feel like it would be cleaner to use the same path for either context.