From 7d8705fb219cbb3438dc86203e48b316a870a11e Mon Sep 17 00:00:00 2001 From: ehmicky Date: Mon, 12 Nov 2018 17:00:00 +0200 Subject: [PATCH] Small refactoring --- gulp/utils/command.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gulp/utils/command.js b/gulp/utils/command.js index b1c8bf1d9..376d3659e 100644 --- a/gulp/utils/command.js +++ b/gulp/utils/command.js @@ -8,11 +8,11 @@ const { get: getPath, PATH } = require('npm-path') const PluginError = require('plugin-error') // Execute a shell command -const execCommand = async function(command, { quiet = false, cwd } = {}) { +const execCommand = async function(command, { quiet = false, ...opts } = {}) { const [commandA, ...args] = command.trim().split(/ +/u) const stdio = getStdio({ quiet }) const envA = await getEnv() - const child = spawn(commandA, args, { env: envA, stdio, cwd }) + const child = spawn(commandA, args, { env: envA, stdio, ...opts }) // eslint-disable-next-line promise/avoid-new return new Promise(execCommandPromise.bind(null, { child, command }))