Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts: snippets: Fix path output on windows
Browse files Browse the repository at this point in the history
Fixes an issue with paths being output in windows-style with back
slashes, this causes issues for certain escape sequences when
cmake interprets them. Replace these paths with posix paths so
that they are not treated as possible escape sequences.

Signed-off-by: Jamie McCrae <[email protected]>
(cherry picked from commit b680a6e)
nordicjm authored and github-actions[bot] committed Mar 11, 2024
1 parent 0de7085 commit 1025910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/snippets.py
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ def append_value(variable, value):
path = pathobj.parent / value
if not path.is_file():
_err(f'snippet file {pathobj}: {variable}: file not found: {path}')
return f'"{path}"'
return f'"{path.as_posix()}"'
if variable in ('DTS_EXTRA_CPPFLAGS'):
return f'"{value}"'
_err(f'unknown append variable: {variable}')

0 comments on commit 1025910

Please sign in to comment.