Use config_export function instead of calling dokku as a subcommand
This commit is contained in:
@@ -89,9 +89,9 @@ case "$1" in
|
||||
config)
|
||||
parse_config_args "$@"
|
||||
config_create
|
||||
is_config_export "$@" && config_export "$DOKKU_CONFIG_TYPE" "$APP" && exit 0
|
||||
|
||||
[[ "$APP" ]] && DOKKU_CONFIG_TYPE=$APP
|
||||
[[ ! -s $ENV_FILE ]] && is_config_export "$@" && exit 0
|
||||
[[ ! -s $ENV_FILE ]] && echo "no config vars for $DOKKU_CONFIG_TYPE" && exit 1
|
||||
|
||||
VARS=$(grep -Eo "export ([a-zA-Z_][a-zA-Z0-9_]*=.*)" $ENV_FILE | cut -d" " -f2-)
|
||||
@@ -101,10 +101,6 @@ case "$1" in
|
||||
echo $VARS
|
||||
exit 0
|
||||
fi
|
||||
if [[ "$var" == "--export" ]]; then
|
||||
echo "$VARS" | awk '{print "export " $0}'
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user