tests: run mvdan/shfmt on test runs
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™. The command used to reprocess everything is: ```shell shfmt -l -bn -ci -i 2 -w . ```
This commit is contained in:
1 parent
fb7c73a7e3
commit
86795ddacc
283 files changed
+1536
-1018
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
scheduler-docker-local-scheduler-logs-failed() {
|
||||
@@ -23,12 +24,12 @@ scheduler-docker-local-scheduler-logs-failed() {
|
||||
while read -r LINE || [[ -n "$LINE" ]]; do
|
||||
CID="$(echo "$LINE" | cut -d ' ' -f1)"
|
||||
PREFIX="$(echo "$LINE" | cut -d ' ' -f2)"
|
||||
if docker inspect "${CID}" > /dev/null 2>&1; then
|
||||
if docker inspect "${CID}" >/dev/null 2>&1; then
|
||||
RUNNING_CONTAINERS+=("$CID")
|
||||
else
|
||||
DEAD_CONTAINERS+=("$CID")
|
||||
fi
|
||||
done < "$FAILED_CONTAINERS_FILE"
|
||||
done <"$FAILED_CONTAINERS_FILE"
|
||||
|
||||
for CID in "${DEAD_CONTAINERS[@]}"; do
|
||||
dokku_log_warn "App container $CID no longer running"
|
||||
@@ -40,7 +41,7 @@ scheduler-docker-local-scheduler-logs-failed() {
|
||||
return
|
||||
fi
|
||||
|
||||
((MAX_INDEX=${#RUNNING_CONTAINERS[*]} - 1)) || true
|
||||
((MAX_INDEX = ${#RUNNING_CONTAINERS[*]} - 1)) || true
|
||||
for i in ${!RUNNING_CONTAINERS[*]}; do
|
||||
local CID="${RUNNING_CONTAINERS[i]}"
|
||||
DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
||||
|
||||
Reference in new issue
Block a user