Summary
I discovered this when people started reporting breakage when they run check-manifest from tox, from a Git for Windows bash.exe shell: mgedmin/check-manifest#64
When you run git.exe on Windows, the way it prints filenames depends on the environment. If MSYSTEM is set to MINGW64, the filenames are printed in the standard Windows fashion (e.g. C:\Users\...). When MSYSTEM is not set, filenames are printed in the Unix fashion (/c/Users/...).
check-manifest runs git in a subprocess to enumerate submodules and versioned files. This works fine, except when tox clears the environment, things break.
I think MSYSTEM should be included in tox's default passenv list, since it describes system configuration (sort of like TERM, or LC_CTYPE) and a wrong value breaks things.
Steps to reproduce
- get a Windows VM
- install Git for Windows
- install Python
- install tox
- launch Git Bash
git clone https://github.com/mgedmin/check-manifest
cd check-manifest
git checkout 0.34 # master has a workaround for this
tox --develop -e py27 -- tests:TestGit.test_get_versioned_files_with_git_submodules
Expected output
- tox indicates it ran 1 test successfully
Actual output
- tox shows a test failure where
subprocess.Popen(..., cwd=...) says the directory name is invalid.
Summary
I discovered this when people started reporting breakage when they run
check-manifestfromtox, from a Git for Windowsbash.exeshell: mgedmin/check-manifest#64When you run
git.exeon Windows, the way it prints filenames depends on the environment. IfMSYSTEMis set toMINGW64, the filenames are printed in the standard Windows fashion (e.g.C:\Users\...). WhenMSYSTEMis not set, filenames are printed in the Unix fashion (/c/Users/...).check-manifestrunsgitin a subprocess to enumerate submodules and versioned files. This works fine, except whentoxclears the environment, things break.I think MSYSTEM should be included in tox's default
passenvlist, since it describes system configuration (sort of like TERM, or LC_CTYPE) and a wrong value breaks things.Steps to reproduce
git clone https://github.com/mgedmin/check-manifestcd check-manifestgit checkout 0.34# master has a workaround for thistox --develop -e py27 -- tests:TestGit.test_get_versioned_files_with_git_submodulesExpected output
Actual output
subprocess.Popen(..., cwd=...)says the directory name is invalid.