Skip to content

Commit

Permalink
Add escape sequence parsing when reading variables
Browse files Browse the repository at this point in the history
Signed-off-by: Bolun Thompson <[email protected]>
  • Loading branch information
BolunThompson committed Nov 5, 2024
1 parent e09e8d6 commit 1a7c6ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/env_vars_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ def read_vars_file(var_file_path):
if var_value is not None and len(var_value) >= 2 and \
var_value[0] == "\"" and var_value[-1] == "\"":
var_value = var_value[1:-1]

## Parse escapes
if var_value is not None:
var_value = bytes(var_value, "utf-8").decode("unicode_escape")

vars_dict[var_name] = (var_type, var_value)

Expand Down

0 comments on commit 1a7c6ff

Please sign in to comment.