This is a small package with a script that sources the login scripts for Bash and Zsh. This simulates running in an interactive login shell to configure environment variables as if the user had opened a shell.
There is both an npm script named source-login-scripts
and a shell scripts in source-login-scripts.sh
. The most reliable way to invoke the script is by running it directly without going through npm or Yarn's script runners:
$(npm bin)/source-login-scripts