I\'m having problems with a shell provisioning script used by Vagrant, as it\'s not executing source /home/vagrant/.bashrc. I\'ve reduced the problem down to this..
source /home/vagrant/.bashrc
You need to remove the “exit if not running interactively” bit (e.g. [ -z "$PS1" ] && return) from the top of your .bashrc.
[ -z "$PS1" ] && return
.bashrc