Files
dokku/plugins/00_dokku-standard/docker-args-build
Jose Diaz-Gonzalez 86795ddacc 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 .
```
2019-01-07 01:25:55 -05:00

27 lines
617 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/config/functions"
app_user_docker_args() {
local APP="$1"
local STDIN
local DOKKU_APP_TYPE
local DOKKU_APP_USER
STDIN=$(cat)
DOKKU_APP_TYPE=$(config_get "$APP" DOKKU_APP_TYPE || true)
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
if [[ "$DOKKU_APP_TYPE" == "herokuish" ]]; then
local docker_args="$STDIN --env=USER=${DOKKU_APP_USER}"
else
local docker_args="$STDIN"
fi
echo -n "$docker_args"
}
app_user_docker_args "$@"