Skip to content

Commit

Permalink
Fixing printing of inspected variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed Dec 8, 2022
1 parent e3665e6 commit 4be0e2a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ function .run.initializer() {
export LibRun__RetryExitCodes=()
}

trap "kill $$" INT

export SENSITIVE_VARS_REGEX="(password|api_key|token)"

export LibRun__DryRun=${False}
Expand Down Expand Up @@ -435,9 +437,9 @@ function run.inspect-variable() {
array.includes "${var_name}" "${OBFUSCATED_VARIABLES[@]}" && obfuscated_value=$(run.obfuscate-string-value "${var_name}")
array.includes "${lcase_var_name}" "${OBFUSCATED_VARIABLES[@]}" && obfuscated_value=$(run.obfuscate-string-value "${lcase_var_name}")

local color="${txtwht}${bakblk}"
local color="${txtblk}${bakpur}"

local value_off=" "
local value_off=""
local value_check=" ✔︎ "
local value_color=""

Expand Down Expand Up @@ -471,16 +473,16 @@ function run.inspect-variable() {
avail_len=$((avail_len + 2))
fi
else
var_value=" 👻 [empty]"
var_value=" [empty]"
color="${bakpur}"
avail_len=$((avail_len + 3))
avail_len=$((avail_len + 2))
fi

# if [[ ${LibRun__Inspect__SkipFalseOrBlank} -eq ${True} && "${value}" == "${value_off}" ]]; then
# return 0
# fi

printf -- " ${txtylw} %-35s ${txtblk}${color} " "${var_name}"
printf -- "${txtylw} %-40s ${txtblk}${color} " "${var_name}"

[[ ${avail_len} -gt ${max_len} ]] && avail_len=${max_len}

Expand Down

0 comments on commit 4be0e2a

Please sign in to comment.