Skip to content

Commit

Permalink
Fix trim in output (Ref #115)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydrogers committed Oct 9, 2024
1 parent 365e8b5 commit c5158fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ get_ansible_variable(){

# Check for variable presence
if echo "$raw_ansible_output" | grep -q "${variable_name}"; then
trimmed_ansible_output=$(echo "$raw_ansible_output" | awk -F': ' '/"'"$variable_name"'"/ {print $2}' | tr -d '[:space:]' | sed 's/\x1b\[[0-9;]*m//g')
trimmed_ansible_output=$(echo "$raw_ansible_output" | awk -F': ' '/"'"$variable_name"'"/ {print $2}' | tr -d '[:space:]"' | sed 's/\x1b\[[0-9;]*m//g')
# Return the cleaned output
echo "$trimmed_ansible_output"
else
Expand Down

0 comments on commit c5158fe

Please sign in to comment.