Skip to content

Commit 0ee61e6

Browse files
committed
Try to fix the VCS tests: git commit on windows
Needs extra (fake) config to be supplied on the command line otherwise it complains it doesn't know the author name or email.
1 parent c0d2e81 commit 0ee61e6

File tree

1 file changed

+4
-2
lines changed
  • cabal-install/tests/UnitTests/Distribution/Client

1 file changed

+4
-2
lines changed

cabal-install/tests/UnitTests/Distribution/Client/VCS.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,10 @@ vcsTestDriverGit verbosity vcs repoRoot =
624624
git ["add", filename]
625625

626626
, vcsCommitChanges = \_state -> do
627-
git $ ["commit", "--all", "--message=a patch",
628-
"--author=Author <[email protected]>"] ++ verboseArg
627+
git $ [ "-c", "user.name", "A", "-c", "user.email", "[email protected]"
628+
, "commit", "--all", "--message=a patch",
629+
, "--author=A <[email protected]>"
630+
] ++ verboseArg
629631
commit <- git' ["log", "--format=%H", "-1"]
630632
let commit' = takeWhile (not . isSpace) commit
631633
return (Just commit')

0 commit comments

Comments
 (0)