Skip to content

$PATH not quite right #18

Description

@cluelesscoder

After opening up up PortableGit (using a git-bash.bat file to keep the settings portable per http://stackoverflow.com/a/3455231/647393 - which by the way should be standard for PortableGit IMO), I found that my $PATH looks like this:
//bin:.:/usr/local/bin:/mingw/bin:/bin:/c/Misc/ConEmu/ConEmu:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/c/Program Files (x86)/Heroku/bin:/c/Program Files (x86)/git/cmd:/c/Program Files (x86)/Java/jre7/bin: C:/Misc/PortablePython-2.7.5.1/App/Scripts

The last path looks different than the rest and therefore doesn't work, and I don't know why. The last two are both part of the user PATH environment variable in Windows 7 but the Java one doesn't get converted into C:/ rather than /c/.

I was able to fix this by editing .bash_profile to append :/c/misc/portablepython-2.7.5.1/app/scripts which works. Incidentally .bash_profile works but .bashrc does not work, which seems opposite of what I'd expect per .bash_profile only applying to "login shells" per http://stackoverflow.com/questions/415403/whats-the-difference-between-bashrc-bash-profile-and-environment.

Activity

  1. t-b commented on Oct 23, 2014

    @t-b

    If you change your windows path to not contain a space before each path component, i.e. c:\Misc\... instead of c:\Misc\... does it work then?
    The $PATH in bash is created as concatenation of the windows paths, converted from c:\a;c:\b to /c/a:/c/b, and the paths internally set, .:/usr/local/bin:/mingw/bin:/bin.

    It looks strange that the first part of $PATH starts with //bin, but that should not matter IIRC.

  2. dscho commented on Oct 23, 2014

    @dscho
    Member

    using a git-bash.bat file to keep the settings portable per http://stackoverflow.com/a/3455231/647393 - which by the way should be standard for PortableGit IMO

    Please open a separate Pull Request to allow discuss these changes.

  3. cluelesscoder commented on Oct 23, 2014

    @cluelesscoder
    Author

    t-b: actually that fixed it! duh. thanks.
    dscho: if you agree, maybe you should open it. it was my interpretation that this was already proposed and rejected by the developers. see dgw's comment at SO: "I asked, and was told it wouldn't be added".
    should I open another issue about ,bash_profile working and ,bashrc not working, or has this question already been addressed?
    also, where is PortableGit? I can't seem to find a place to download it even though I know I did before. did it get taken down? I seriously think that even with the prominent FAQ on the relationship between msysgit and this project, there's a confusing mix of things going on here.

  4. dscho commented on Oct 29, 2014

    @dscho
    Member

    t-b: actually that fixed it! duh. thanks.

  5. dscho commented on Oct 29, 2014

    @dscho
    Member

    dscho: if you agree, maybe you should open it.

    @cluelesscoder I will keep in mind that if I ever am in need for any suggestion how to fill my abundant free time, I will ask you :-P

  6. 24 remaining items

  7. added a commit that references this issue on Aug 13, 2025
  8. added a commit that references this issue on Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions