Build not failing even test exit with code 1

set -o pipefail does not work for me. If I put this in a npm script tag, I get an error on the console:

sh: 1: set: Illegal option -o pipefail

I’m using the Ubuntu 14.04 (Trusty) image…