Merge pull request #21 from jviotti/feat/preserve-environment
Preserve user environment if possible.
This commit is contained in:
commit
5803d0155b
1 changed files with 2 additions and 0 deletions
2
index.js
2
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,
|
||||
|
|
Loading…
Add table
Reference in a new issue