Skip to content
Permalink
Browse files

Preserve user environment

Some child processes executed with this module might benefit from being
able to read their parent process environment variables.

Fixes: #20
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
  • Loading branch information...
Juan Cruz Viotti
Juan Cruz Viotti committed May 16, 2016
1 parent d3cb072 commit 4a5baf5716d05a50694a03b4f5b7f7e71abdf245
Showing with 2 additions and 0 deletions.
  1. +2 −0 index.js
@@ -14,6 +14,8 @@ function Attempt(instance, end) {
var command = [];
command.push('/usr/bin/sudo');
command.push('-n');
// Preserve user environment:
command.push('-E');
command.push(instance.command);
command = command.join(' ');
Node.child.exec(command,

0 comments on commit 4a5baf5

Please sign in to comment.
You can’t perform that action at this time.