OK, in case someone else hits the same issue, replace
PATH="/root/.composer/vendor/bin:$PATH"
with
PATH="/home/vagrant/.config/composer/vendor/bin:$PATH"
in ~/.profile and don't forget to add spark installer to the path, e.g.
PATH="/home/vagrant/Code/spark-installer:$PATH"
I might need to create a pull request to fix this