Skip to content

Commit 316e24e

Browse files
Correctly trap errors in shell scripts (#1844)
1 parent 22f0719 commit 316e24e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

resources/checkgit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Exit immediately if any subcommand terminated
2-
trap "exit 1" TERM
2+
trap "exit 1" ERR
33

44
#
55
# This script determines if current git state is the up to date master. If so

resources/gitpublish.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/bin/sh -e
1+
#!/bin/sh
22

33
# Exit immediately if any subcommand terminated
4-
trap "exit 1" TERM
4+
trap "exit 1" ERR
55

66
# This script maintains a git branch which mirrors master but in a form that
77
# what will eventually be deployed to npm, allowing npm dependencies to use:

resources/prepublish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Exit immediately if any subcommand terminated
2-
trap "exit 1" TERM
2+
trap "exit 1" ERR
33

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

0 commit comments

Comments
 (0)