Skip to content

Commit eb6a806

Browse files
committed
Fix handling of Windows backslash path in meson.build
1 parent 87563ea commit eb6a806

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

meson.build

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,9 @@ run_command(
322322
python,
323323
'-c',
324324
'''
325-
open("@0@/.ignore", "w").write("""
325+
import sys, pathlib
326+
target = pathlib.Path(sys.argv[1]) / ".ignore"
327+
target.write_text("""
326328
# `.ignore` takes precedence over `.gitignore` in dev tools (vscode, ripgrep etc.)
327329
# Here we overwrite `.gitignore` rule to allow search in `gdextension_api` & `src`
328330
# folders.
@@ -343,7 +345,8 @@ python_distrib
343345
python_prebuild-*
344346
README.txt
345347
""")
346-
'''.format(meson.current_build_dir()),
348+
''',
349+
meson.current_build_dir(),
347350
check: true,
348351
)
349352

0 commit comments

Comments
 (0)