Re: BUG: git bash / python interaction with absolute paths as environment variables in Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Leland,

On Mon, 6 Dec 2021, Leland Weathers wrote:

> Issue: Using Git Bash for Windows (2.34.1-64) and Python 3.9.9, a git
> path is incorrectly prepended to environment variables in Python code.

>From Git for Windows' [Release Notes' "Known Issues"
section](https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md#known-issues):

	* If you specify command-line options starting with a slash,
	  POSIX-to-Windows path conversion will kick in converting e.g.
	  "`/usr/bin/bash.exe`" to "`C:\Program Files\Git\usr\bin\bash.exe`".
	 When that is not desired -- e.g.
	 "`--upload-pack=/opt/git/bin/git-upload-pack`" or "`-L/regex/`" --
	 you need to set the environment variable `MSYS_NO_PATHCONV`
	 temporarily, like so:

	 > `MSYS_NO_PATHCONV=1 git blame -L/pathconv/ msys2_path_conv.cc`

	 Alternatively, you can double the first slash to avoid
	 POSIX-to-Windows path conversion, e.g. "`//usr/bin/bash.exe`".

Those release notes are shown by default when you install Git for Windows,
and they are also accessible via the Start Menu as "Git Release Notes".

> [... snip ...]
>
> In both cases I am using the same Python virtual environment. Other
> environment variables (e.g. non-absolute directory paths) appear to be
> read correctly. I'm assuming that this is a git issue given the

Premature end-of-mail?

Ciao,
Johannes




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux