Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/ansible.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ AbstractAnsibleCommand.prototype.exec = function(options) {
processOptions.cwd = options.cwd;
}

// Make Ansible output unbuffered so the stdout and stderr `data` events
// Make Ansible output unbuffered so the stdout and stderr `data` events
// pickup output up more regularly
var unbuffered = (options.buffered) ? '' : 1;
processOptions.env = process.env;
_.extend( processOptions.env, { PYTHONUNBUFFERED: unbuffered } );
_.extend( processOptions.env, options.env || {} );
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_.extend can accept multiple objects as sources. Please fix the code to look like this:

_.extend( processOptions.env, options.env, { PYTHONUNBUFFERED: unbuffered } );


var output = '';
var child = exec.spawn(this.commandName(), this.compileParams(), processOptions);
Expand Down