Comparing version 1.1.5 to 1.2.0
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/Kikobeats/tinyspawn", | ||
"version": "1.1.5", | ||
"version": "1.2.0", | ||
"main": "src/index.js", | ||
@@ -8,0 +8,0 @@ "author": { |
@@ -15,4 +15,5 @@ 'use strict' | ||
const extend = defaults => (input, options) => { | ||
const [cmd, ...args] = input.split(' ').filter(Boolean) | ||
const extend = defaults => (input, args, options) => { | ||
if (!(args instanceof Array)) { options = args; args = [] } | ||
const [cmd, ...cmdArgs] = input.split(' ').filter(Boolean).concat(args) | ||
let childProcess | ||
@@ -22,3 +23,3 @@ | ||
const opts = { ...defaults, ...options } | ||
childProcess = spawn(cmd, args, opts) | ||
childProcess = spawn(cmd, cmdArgs, opts) | ||
const stdout = eos(childProcess, 'stdout') | ||
@@ -33,3 +34,3 @@ const stderr = eos(childProcess, 'stderr') | ||
if (code === 0) return resolve(childProcess) | ||
const command = `${cmd} ${args.join(' ')}` | ||
const command = `${cmd} ${cmdArgs.join(' ')}` | ||
let message = `The command spawned as:${EOL}${EOL}` | ||
@@ -36,0 +37,0 @@ message += ` ${command}${EOL}${EOL}` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10588
42