Skip to content

Commit

Permalink
chore: Use object-assign
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongzhi107 committed Mar 20, 2017
1 parent da65ee5 commit f2865d6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ var spawn = require('child_process').spawn,
objectAssign = require('object-assign');

module.exports = function exec(script, program) {
var dotenvConfig = { silent: true };
['encoding', 'path'].forEach(function (key) {
if (key in program) {
dotenvConfig[key] = program[key];
}
var dotenvConfig = objectAssign({ silent: true }, {
encoding: program.encoding,
path: program.path
});

require('dotenv').config(dotenvConfig);
Expand Down

0 comments on commit f2865d6

Please sign in to comment.