Skip to content

Commit

Permalink
👕 Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcanemagus committed Feb 3, 2016
1 parent 1b0f9c3 commit ea8b5db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ function _exec(command, args, opts, isNode) {
return new Promise((resolve, reject) => {
const data = { stdout: [], stderr: [] }
const handleError = error => {
if (error.code === 'EACCES' || (error.message && error.message.indexOf(COMMAND_NOT_RECOGNIZED_MESSAGE) !== -1)) {
if (error.code === 'EACCES' ||
(error.message && error.message.indexOf(COMMAND_NOT_RECOGNIZED_MESSAGE) !== -1)
) {
const newError = new Error(`Failed to spawn command '${command}'.` +
` Make sure it's a file, not a directory, and it's executable.`)
newError.name = 'BufferedProcessError'
Expand Down Expand Up @@ -71,7 +73,7 @@ function _exec(command, args, opts, isNode) {
new BufferedNodeProcess(parameters) :
new BufferedProcess(parameters)

spawnedProcess.onWillThrowError(({error}) => {
spawnedProcess.onWillThrowError(({ error }) => {
handleError(error)
})

Expand Down

0 comments on commit ea8b5db

Please sign in to comment.