From 32e1069d433bf5295df392f65ab777e827a3aa1e Mon Sep 17 00:00:00 2001 From: Tortue Torche Date: Sun, 11 Aug 2019 03:23:32 -0400 Subject: [PATCH] Move env_file_to_json next to other helper functions --- psu | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/psu b/psu index 4e95999..c550432 100644 --- a/psu +++ b/psu @@ -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() {