pwnall/node-open — pull request #15 by shahata (2013-09-22 07:28:12+00:00)
Title: launch browser as original user if run from sudo

When running the node application using 'sudo' on mac, Safari was opened instead of the user's default browser. This PR tests the SUDO_USER environment variable to see if we are during sudo, and if so, runs the command with the original user context. This fixes issue #4.