mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Shell script error handling (#628)
* fn: fortify shell scripts with euo pipefail
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# find and output all Go files that are not correctly formatted
|
# find and output all Go files that are not correctly formatted
|
||||||
|
set -euo pipefail
|
||||||
set -e
|
|
||||||
|
|
||||||
# Find all .go files except those under vendor/ or .git, run gofmt -l on them
|
# Find all .go files except those under vendor/ or .git, run gofmt -l on them
|
||||||
OUT=$(find ! \( -path ./vendor -prune \) ! \( -path ./.git -prune \) -name '*.go' -exec gofmt -l {} +)
|
OUT=$(find ! \( -path ./vendor -prune \) ! \( -path ./.git -prune \) -name '*.go' -exec gofmt -l {} +)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ex
|
set -exuo pipefail
|
||||||
|
|
||||||
user="fnproject"
|
user="fnproject"
|
||||||
image="fnserver"
|
image="fnserver"
|
||||||
|
|||||||
Reference in New Issue
Block a user