Skip to content

Commit

Permalink
Correctly trap errors in shell scripts (#1844)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed May 2, 2019
1 parent 22f0719 commit 316e24e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/checkgit.sh
@@ -1,5 +1,5 @@
# Exit immediately if any subcommand terminated
trap "exit 1" TERM
trap "exit 1" ERR

#
# This script determines if current git state is the up to date master. If so
Expand Down
4 changes: 2 additions & 2 deletions resources/gitpublish.sh
@@ -1,7 +1,7 @@
#!/bin/sh -e
#!/bin/sh

# Exit immediately if any subcommand terminated
trap "exit 1" TERM
trap "exit 1" ERR

# This script maintains a git branch which mirrors master but in a form that
# what will eventually be deployed to npm, allowing npm dependencies to use:
Expand Down
2 changes: 1 addition & 1 deletion resources/prepublish.sh
@@ -1,5 +1,5 @@
# Exit immediately if any subcommand terminated
trap "exit 1" TERM
trap "exit 1" ERR

# Publishing to NPM is currently supported by Travis CI, which ensures that all
# tests pass first and the deployed module contains the correct file structure.
Expand Down

0 comments on commit 316e24e

Please sign in to comment.