Git-subrepo: GIT_SUBREPO_ROOT being duplicated when running tests

Created on 21 Feb 2017  路  1Comment  路  Source: ingydotnet/git-subrepo

user@workstation ~/Documents/git-subrepo $ make test
prove test/
test/branch-all.t ........... C:/Users/user/Documents/git-subrepo/.rc: line 21: cd: C:/Users//Documents/git-subrepo/C:/Users//Documents/git-subrepo: No such file or directory
test/setup: line 17: bash+: No such file or directory
test/branch-all.t ........... Dubious, test returned 1 (wstat 256, 0x100)

The contents of my .bashrc is the single line:
source ~/Documents/git-subrepo/.rc

When I echo $PATH in a new shell, I can see that /c/Users/<user>/Documents/git-subrepo/lib has been added twice. Is this a bug from the bash script?

The terminal starts just fine, and the commands seem to be working. I just installed this today, so I haven't gotten to use it extensively, but the git subrepo version and git subrepo help commands run fine. I am using the Cmder emulator on Windows 7.

Question

Most helpful comment

Seems like the test for an absolute path in line 19-20 is wrong for windows (path starts with C:/ at least when running the tests):

[[ $GIT_SUBREPO_ROOT =~ ^/ ]] ||
  GIT_SUBREPO_ROOT=$PWD/$GIT_SUBREPO_ROOT

>All comments

Seems like the test for an absolute path in line 19-20 is wrong for windows (path starts with C:/ at least when running the tests):

[[ $GIT_SUBREPO_ROOT =~ ^/ ]] ||
  GIT_SUBREPO_ROOT=$PWD/$GIT_SUBREPO_ROOT
Was this page helpful?
0 / 5 - 0 ratings