summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2018-04-01 20:25:32 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-04-01 20:25:32 -0400
commitffedeab545c1c4f45f315adbdc7a42dea707f455 (patch)
tree1825fb834bdb7115df658b4af85bc51fa5bf154e
parent4075f9ed3631ac04042678ffeffa74e166d12b15 (diff)
config: Avoid using && for flow-controlparabola/20180401
`set -e` doesn't trip on command lists containing &&, even if the command list sets $? to non-zero. However, when used as the last command in a sourced file, that $? is used as the return value for the calling `source` command, which then does trip `set -e`. This affected `db-import-pkg`. So, avoid the impropriety of spewing non-zero $? in the config file, since doesn't know the context it's loaded in.
-rwxr-xr-xconfig2
1 files changed, 1 insertions, 1 deletions
diff --git a/config b/config
index d747e8c..a8a5a0f 100755
--- a/config
+++ b/config
@@ -45,4 +45,4 @@ FROM="repo@repo.parabola.nu"
# Override default config with config.local
LOCAL_CONFIG=${DBSCRIPTS_CONFIG:-"$(dirname ${BASH_SOURCE[0]})/config.local"}
-[[ -f "${LOCAL_CONFIG}" ]] && . "${LOCAL_CONFIG}"
+if [[ -f "${LOCAL_CONFIG}" ]]; then . "${LOCAL_CONFIG}"; fi