Skip to content

Commit 7df77a2

Browse files
authored
test: fix path problem (#15)
* fix path problem * fix path problem
1 parent 46162e2 commit 7df77a2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

maven-plugin/src/test/java/io/github/chains_project/classport/plugin/EmbeddingMojoTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ private int getExitCodeRunMavenPlugin() throws MavenInvocationException, IOExcep
158158
request.setBatchMode(true);
159159

160160
Invoker invoker = new DefaultInvoker();
161-
162-
161+
String os = System.getProperty("os.name");
162+
if (os.contains("Mac")) {
163+
invoker.setMavenHome(new File(System.getenv("M2_HOME")));
164+
}
163165
InvocationResult result = invoker.execute(request);
164166
return result.getExitCode();
165167

0 commit comments

Comments
 (0)