CoatiSoftware / Sourcetrail

Sourcetrail - free and open-source interactive source explorer
https://www.sourcetrail.com/
GNU General Public License v3.0
14.94k stars 1.41k forks source link

fix: java path detection failures on linux #1138

Closed midchildan closed 3 years ago

midchildan commented 3 years ago

readlink was being invoked as "readlink" "-f path/to/java". It should've been "readlink" "-f" "path/to/java" instead.

This can verified by running the tests and looking at the output of the following command:

$ sudo execsnoop -q | grep readlink
readlink         2060   1925     0 "/nix/store/0y7rv26ffa359wvqd3js94cn73z882fg-coreutils-8.32/bin/readlink" "-f /nix/store/d5mpdil4c8z466f9zyxywxg5lm2zk3ls-openjdk-8u272-b10-jre/bin/java"
readlink         2081   1925     0 "/nix/store/0y7rv26ffa359wvqd3js94cn73z882fg-coreutils-8.32/bin/readlink" "-f /nix/store/xr5xm2bmfhd02v8h9ghzmhbcdc49ms55-openjdk-8u272-b10/lib/openjdk/jre/bin/java"
mlangkabel commented 3 years ago

Thanks!