Page MenuHomePhabricator

Load .bashrc when using become
Open, Needs TriagePublic

Description

When typing become toolname environment setup is not initiated. The following script should be added to all /data/project/*/.profile similar to /etc/skel/.profile

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -n "$SUDO_USER" -a -f "/home/$SUDO_USER/.bashrc" ]; then
    . "/home/$SUDO_USER/.bashrc"
    fi
fi