Skip to content

Commit

Permalink
🔨 Fix Windows path backslash treated as escape
Browse files Browse the repository at this point in the history
Co-Authored-By: Luc <[email protected]>
  • Loading branch information
thinkyhead and luc-github committed May 18, 2023
1 parent 51fbe03 commit 74a6f59
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions buildroot/share/PlatformIO/scripts/common-dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ def add_to_feat_cnf(feature, flines):
# Get a reference to the FEATURE_CONFIG under construction
feat = FEATURE_CONFIG[feature]

# Split up passed lines on commas or newlines and iterate
# Add common options to the features config under construction
# For lib_deps replace a previous instance of the same library
atoms = re.sub(r',\s*', '\n', flines).strip().split('\n')
# Split up passed lines on commas or newlines and iterate.
# Take care to convert Windows '\' paths to Unix-style '/'.
# Add common options to the features config under construction.
# For lib_deps replace a previous instance of the same library.
atoms = re.sub(r',\s*', '\n', flines.replace('\\', '/')).strip().split('\n')
for line in atoms:
parts = line.split('=')
name = parts.pop(0)
Expand Down

0 comments on commit 74a6f59

Please sign in to comment.