[Bug 3687] New: Windows MSI installer appends slash on PATH

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Mon Oct 29 08:45:50 CDT 2012


          Priority: normal
            Bug ID: 3687
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Windows MSI installer appends slash on PATH
          Severity: bug
    Classification: Unclassified
                OS: Windows
          Reporter: adrian at cadifra.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: unspecified
         Component: Mercurial
           Product: Mercurial

Graham Wideman <gwlist at grahamwideman.com> reported on the mercurial at selenic.com
list [1]:

Looks like there's a fatal (but rare?) bug in the Windows installer (MSI, x86,
but probably applies to the others).

To make hg.exe findable the installer adds this string to the end of the
current System Path variable like this:

C:\Program Files (x86)\Mercurial\

That probably works for many users, but if the user also has a user PATH
variable set, then Mercurial's path component gets omitted  (and running hg
from the command line obviously fails).

This is evidently because Windows' algorithm for appending the user PATH to the
System Path is to either look for the last semicolon (the path component
separator), or it gets confused by the unneeded trailing backslash.

So, I suggest change Mercurial's Path component so that it results in:

C:\Program Files (x86)\Mercurial;

(No backslash, add semicolon)

This was discovered on Windows 7. It happens that some previous installer had
set a user PATH string for Qt.

[1] http://www.selenic.com/pipermail/mercurial/2012-October/044463.html

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Mercurial-devel mailing list