Merge "Check for set -o pipefail"
This commit is contained in:
		| @@ -72,7 +72,7 @@ for i in $(find elements -type f); do | |||||||
|         fi |         fi | ||||||
|     fi |     fi | ||||||
|  |  | ||||||
|     # Check that all scripts are set -eu |     # Check that all scripts are set -eu -o pipefail | ||||||
|     # NOTE(bnemec): This doesn't verify that the set call occurs high |     # NOTE(bnemec): This doesn't verify that the set call occurs high | ||||||
|     # enough in the file to be useful, but hopefully nobody will be |     # enough in the file to be useful, but hopefully nobody will be | ||||||
|     # sticking set calls at the end of their file to trick us.  And if |     # sticking set calls at the end of their file to trick us.  And if | ||||||
| @@ -94,6 +94,12 @@ for i in $(find elements -type f); do | |||||||
|                 rc=1 |                 rc=1 | ||||||
|             fi |             fi | ||||||
|         fi |         fi | ||||||
|  |         if ! excluded setpipefail; then | ||||||
|  |             if [ -z "$(grep "^set -o pipefail" $i)" ]; then | ||||||
|  |                 echo "ERROR: $i is not set -o pipefail" | ||||||
|  |                 rc=1 | ||||||
|  |             fi | ||||||
|  |         fi | ||||||
|     fi |     fi | ||||||
| done | done | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jenkins
					Jenkins