puppetlabs/puppetlabs-vcsrepo — pull request #136 by kmullin (2014-05-09 17:37:35+00:00)
Title: Add -s /bin/sh to su command for git and hg

When a users shell is set to /bin/false or any other non-login shell
the su command in both git and hg providers will not successfully
switch to the user. This allows for detection of Linux, whos su has
'-s' argument to overwrite the shell used.

If the system is not Linux, then shell will become nil, and you can AFAIK, splat a nil.