Skip to content

Commit

Permalink
only parse floats as string to avoid messing up booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Jun 27, 2024
1 parent 1d3f0b2 commit 7995fd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sb.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def run_ansible_playbook(repo_path, playbook_path, ansible_binary_path, tags=Non
key, value = var.split("=", 1)
try:
# Attempt to parse the value as JSON
parsed_value = json.loads(value, parse_float=str, parse_int=str, parse_constant=str)
parsed_value = json.loads(value, parse_float=str)
except json.JSONDecodeError:
# If JSON parsing fails, treat it as a plain string
parsed_value = value
Expand Down

0 comments on commit 7995fd2

Please sign in to comment.