Skip to content

Commit

Permalink
correction in simple git error handling example
Browse files Browse the repository at this point in the history
  • Loading branch information
JayaKrishnaNamburu authored and steveukx committed Mar 27, 2023
1 parent 6752835 commit 9af4328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/PLUGIN-ERRORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

By default, `simple-git` will determine that a `git` task has resulted in an error when the process exit
code is anything other than `0` and there has been some data sent to the `stdErr` stream. Error handlers
will be passed the content of both `stdOut` and `stdErr` concatenated together.
will be passed the content of both `stdOut` and `stdErr` concatenated together.

To change any of this behaviour, configure the `simple-git` with the `errors` plugin with a function to be
called after every task has been run and should return either `undefined` when the task is treated as
Expand All @@ -21,7 +21,7 @@ const git = simpleGit({
if (error) return error;

// customise the `errorCode` values to treat as success
if (result.errorCode === 0) {
if (result.exitCode === 0) {
return;
}

Expand Down

0 comments on commit 9af4328

Please sign in to comment.