mercredi 27 février 2019

grep result of npm test in bash conditional

I need to grep the result of an

npm test

from my bash conditional.

So I can stop my CI/CD environment

there is a suggestion to use grep like:

VALID="$(npm test | grep -o 'failing')"

but when I do that, just to try what actually is in the pipeline for "npm test"

VALID="$(npm test)"

What I see is:

echo "$VALID"

> MyApp@0.0.1 test /Users/NE/ts/project
> jest

SO, how will that work? how can I really grep the result of the npm test?

thanks!

Aucun commentaire:

Enregistrer un commentaire