Move env_file_to_json next to other helper functions

This commit is contained in:
Tortue Torche 2019-08-11 03:23:32 -04:00 committed by Tortue Torche
parent 804010c88d
commit 32e1069d43

26
psu
View File

@ -1110,19 +1110,6 @@ login() {
fi
}
###################################################
# Convert environment variables from file to JSON #
# Globals: #
# ENVIRONMENT_VARIABLES_FILE #
# Arguments: #
# None #
# Returns: #
# JSON string #
###################################################
env_file_to_json() {
echo "$(env -i sh -c "(unset \$(env | sed 's/=.*//'); set -a; . $(readlink -f $ENVIRONMENT_VARIABLES_FILE); set +a; jq -njc 'env | to_entries | map({name: .key, value: .value})')")"
}
# Get Docker info
docker_info() {
local docker_info
@ -1260,6 +1247,19 @@ lint() {
fi || true
}
###################################################
# Convert environment variables from file to JSON #
# Globals: #
# ENVIRONMENT_VARIABLES_FILE #
# Arguments: #
# None #
# Returns: #
# JSON string #
###################################################
env_file_to_json() {
echo "$(env -i sh -c "(unset \$(env | sed 's/=.*//'); set -a; . $(readlink -f $ENVIRONMENT_VARIABLES_FILE); set +a; jq -njc 'env | to_entries | map({name: .key, value: .value})')")"
}
# Set the ACTIONS variable who's a list of all psu actions
# Set the ACTIONS_ASSOC variable who's an associative array of all psu actions
transform_actions_table() {