pulley icon indicating copy to clipboard operation
pulley copied to clipboard

Testing for errors by string compare on stderr fails with git commands.

Open johnjbarton opened this issue 10 years ago • 0 comments

Pulley uses string analysis of stderr to detect errors. Unfortunately git sends normal output to stderr for many of its commands, eg including fetch http://git.661346.n2.nabble.com/Bugreport-Git-responds-with-stderr-instead-of-stdout-td4959280.html

When pulley analyzes stderr, any thing it looks for could be in the normal output.

In particular consider this normal output:

From https://github.com/johnjbarton/traceur-compiler
 * branch            getProtoParent-errors -> FETCH_HEAD
Switched to branch 'master'

and the test in pulley:

                } else if ( /error/.test( stderr ) ) {

and you can see that any branch with the string 'error' will break pulley. And I don't know about you, but I often have branches with 'error' in them, as I fix bugs.

git should send non-zero error code for real errors and pulley could check those with the first arg to the exec callback.

johnjbarton avatar Jul 10 '14 01:07 johnjbarton