Skip to content

Commit

Permalink
Try without domain
Browse files Browse the repository at this point in the history
Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
  • Loading branch information
AriehSchneier committed Jun 4, 2023
1 parent 1d10ba8 commit 98917d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plumbing/format/gitignore/dir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ func (s *MatcherSuite) SetUpTest(c *C) {
c.Assert(err, IsNil)
currentUser, err := user.Current()
c.Assert(err, IsNil)
username := strings.ReplaceAll(currentUser.Username, "\\", "\\\\")
// remove domain for windows
username := currentUser.Username[strings.Index(currentUser.Username, "\\")+1:]
_, err = f.Write([]byte(" excludesfile = ~" + username + "/.gitignore_global" + "\n"))
c.Assert(err, IsNil)
err = f.Close()
Expand Down

0 comments on commit 98917d5

Please sign in to comment.