Skip to content

Commit

Permalink
Fixed AbstractGitMojoTest#testErrors on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
koraktor committed Jun 28, 2012
1 parent 4f30076 commit ad7630b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ public void testErrors() {
assertEquals("Git directory is not set", e.getMessage());
}

this.mojo.gitDir = new File(System.getenv().get("HOME")).getAbsoluteFile();
String home = System.getenv().get("HOME");
if (home == null) {
home = System.getenv().get("HOMEDRIVE") + System.getenv("HOMEPATH");
}
this.mojo.gitDir = new File(home).getAbsoluteFile();
try {
this.mojo.initRepository();
fail("No exception thrown");
Expand Down

0 comments on commit ad7630b

Please sign in to comment.