From 56cd6c965d4835d12530b2be97171e1c7063e1dc Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Wed, 15 Jul 2020 22:02:20 +0100 Subject: [PATCH] Avoid backslash-in-env-var entirely --- test/test_environment.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test_environment.py b/test/test_environment.py index 04d4d3d9..6ff4dbd1 100644 --- a/test/test_environment.py +++ b/test/test_environment.py @@ -65,9 +65,8 @@ def test_overridden_path(tmp_path, capfd): (new_path / 'python').touch(mode=0o777) utils.cibuildwheel_run(project_dir, output_dir=output_dir, add_env={ - # use single-quotes for new_path, because on windows, paths with backslashes - # are interpreted by bash as escape sequences! - 'CIBW_ENVIRONMENT': f'''PATH='{new_path}{os.pathsep}'$PATH''', + 'NEW_PATH': new_path, + 'CIBW_ENVIRONMENT': f'''PATH="$NEW_PATH{os.pathsep}$PATH''', }) assert len(os.listdir(output_dir)) == 0