Skip to content

Commit

Permalink
Small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Nov 12, 2018
1 parent 052cfd9 commit 7d8705f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gulp/utils/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
Expand Down

0 comments on commit 7d8705f

Please sign in to comment.