Skip to content

Commit

Permalink
Merge pull request #400 from anadahz/fix/feature/install
Browse files Browse the repository at this point in the history
Preserve evnironment in su and sudo commands
  • Loading branch information
hellais committed Jul 13, 2015
2 parents 0ed75b1 + 2354162 commit ccc751b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ user="$(id -un 2>/dev/null || true)"
sh_c='sh -c'
if [ "$user" != 'root' ]; then
if command_exists sudo; then
sh_c='sudo sh -c'
sh_c='sudo sh -c -E'
elif command_exists su; then
sh_c='su -c'
sh_c='su -c --preserve-environment'
else
echo >&2 'Error: this installer needs the ability to run commands as root.'
echo >&2 'We are unable to find either "sudo" or "su" available to make this happen.'
Expand Down

0 comments on commit ccc751b

Please sign in to comment.