cargo_wrapper: Fix backslashes being parsed as escape codes on Windows

Fixes #696

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2285>
This commit is contained in:
L. E. Segovia 2025-06-11 09:52:42 -03:00
parent 289d0c4cac
commit 18723217fc

View file

@ -94,7 +94,7 @@ if __name__ == "__main__":
rustc_target = None
if 'RUSTC' in env:
rustc_cmdline = shlex.split(env['RUSTC'])
rustc_cmdline = shlex.split(env['RUSTC'], posix=sys.platform != 'win32')
# grab target from RUSTFLAGS
rust_flags = rustc_cmdline[1:] + shlex.split(env.get('RUSTFLAGS', ''))
if '--target' in rust_flags: