Skip to content

Commit

Permalink
Merge pull request heroku#56 from heroku/pipefail
Browse files Browse the repository at this point in the history
use pipefail to force exit when `npm install` fails.
  • Loading branch information
zeke committed Oct 16, 2013
2 parents 5bc02d2 + b82b5bf commit b43097f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bin/compile
@@ -1,10 +1,8 @@
#!/usr/bin/env bash

# fail fast
set -e

# enable debugging
# set -x
set -e # fail fast
set -o pipefail # don't ignore piped exit codes
# set -x # enable debugging

# Configure directories
build_dir=$1
Expand Down
5 changes: 5 additions & 0 deletions bin/test
Expand Up @@ -66,6 +66,11 @@ testProfileCreated() {
assertCapturedSuccess
}

testInvalidDependency() {
compile "invalid-dependency"
assertCapturedError 1 "not in the npm registry"
}

testNodeModulesCached() {
cache=$(mktmpdir)
compile "caching" $cache
Expand Down

0 comments on commit b43097f

Please sign in to comment.