Skip to content

Commit 3a119ee

Browse files
committed
add object-assign polyfill
because older versions of node does not support native Object.assign
1 parent edfa889 commit 3a119ee

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/exec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var spawn = require('child_process').spawn;
22
var dotenv = require('./dot-env');
3+
var objectAssign = require('object-assign');
34

45
module.exports = function exec(script) {
56

@@ -14,7 +15,7 @@ module.exports = function exec(script) {
1415

1516
script.env = script.env || {};
1617

17-
var env = Object.assign(process.env, script.env, dotenv);
18+
var env = objectAssign(process.env, script.env, dotenv);
1819

1920
console.log('to be executed:', command, options.join(' '));
2021
var command = spawn(command, options, {env: env});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"test": "node index.js test --test"
2121
},
2222
"dependencies": {
23-
"endofline": "0.0.3"
23+
"endofline": "0.0.3",
24+
"object-assign": "^4.0.1"
2425
},
2526
"betterScripts": {
2627
"test": {

0 commit comments

Comments
 (0)