git-bash $PATH cannot parse windows directory with space

前端 未结 7 1297
旧时难觅i
旧时难觅i 2020-12-10 10:37

I would like to use git-bash come with github client on a windows 7 (32bit) machine. Somehow, the git-bash has already learned the $PATH variables from windows

7条回答
  •  心在旅途
    2020-12-10 11:15

    The answer for me was close to that of Seagal82. I added the following line at the start of [PATH_TO_GITBASH_INSTALL]\etc\profile:

    export HOME="/c/Users/Username\ with\ spaces/"
    

    Then I started a new git bash window and all the paths in $PATH using $HOME got replaced with the anti-slashed space and work correctly.

提交回复
热议问题