You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2023/01/24 10:36:48 UTC

[maven-mvnd] branch master updated: Fix discovery of mvnd.home using the executable

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git


The following commit(s) were added to refs/heads/master by this push:
     new b0ea8527 Fix discovery of mvnd.home using the executable
b0ea8527 is described below

commit b0ea852798dff0093421c285d683d61d6e78f5a7
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Tue Jan 24 11:36:39 2023 +0100

    Fix discovery of mvnd.home using the executable
---
 client/src/main/java/org/mvndaemon/mvnd/client/DaemonParameters.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonParameters.java b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonParameters.java
index b416d29b..7dfa00be 100644
--- a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonParameters.java
+++ b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonParameters.java
@@ -120,7 +120,7 @@ public class DaemonParameters {
     private String mvndHomeFromExecutable() {
         Optional<String> cmd = ProcessHandle.current().info().command();
         if (Environment.isNative() && cmd.isPresent()) {
-            final Path mvndH = Paths.get(cmd.get()).getParent();
+            final Path mvndH = Paths.get(cmd.get()).getParent().getParent();
             if (mvndH != null) {
                 final Path mvndDaemonLib = mvndH.resolve(
                         "lib/mvnd-daemon-" + BuildProperties.getInstance().getVersion() + ".jar");