Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 16, 2019
1 parent e31ab5a commit b6abbf2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ const createError = function(error, opts) {
const errorA = error instanceof Error ? error : new Error(error)
fixStack(errorA)
return new PluginError('gulp-execa', errorA, {
showProperties: false,
showStack: true,
...PLUGIN_ERROR_OPTS,
...opts,
})
}

const PLUGIN_ERROR_OPTS = { showProperties: false, showStack: true }

// `plugin-error` repeats the error message by printing both `error.message`
// and the first line of `error.stack`. We remove that last one.
const fixStack = function(error) {
Expand Down

0 comments on commit b6abbf2

Please sign in to comment.