sbt / sbt-native-packager

sbt Native Packager
https://sbt-native-packager.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
1.59k stars 439 forks source link

Fix for realpath in top-level directories #1451

Closed darabos closed 3 years ago

darabos commented 3 years ago

The realpath function returns a slightly wrong path for top-level directories. realpath /root gives //root. This can cause real issues and has led me on a wild goose chase yesterday. (https://github.com/lynxkite/lynxkite/issues/200)

Maybe I should have filed a bug instead of a pull request. I'm not sure this is the best fix. And this same function is repeated in a few places. (ash-template in this repo, and another script in the sbt repo, at least.) Let me know what's your preference.

Thanks!

muuki88 commented 3 years ago

Thanks for fixing this 🤗 A pull request is always a good option. And sorry to hear that you had a rough time due to this misbehaviour 😣