Are any other people on linux who use the default (static) binary have this problem?
bb -e '(System/getProperty "user.home")'
"?"
I can't repro it, but some people do seem to have it:
https://github.com/babashka/bbin/issues/75#issuecomment-3836340842I think I ran into a similar thing with docker/jvm when running a container with a user id that is not present in the image
0% docker run -u 1234 --rm --entrypoint bb babashka/babashka:1.12.215-SNAPSHOT -e '(System/getProperty "user.home")'
"?"
vs
0% docker run --rm --entrypoint bb babashka/babashka:1.12.215-SNAPSHOT -e '(System/getProperty "user.home")'
"/root"
it's related to how jvm resolves the userthat does make sense, does it?
found https://stackoverflow.com/a/70023437 with links to jdk17 source code ah now noticed the issue link, possibly different context in the issue, but maybe around same root
> I'm not using Docker. I managed to fix the issue using the non-static version, as I mentioned before. If you want, I can run some commands. Please respond in the Github issue if you have anything to add
yup, thanks 🙂
I tested on both Ubuntu 20.04 and 24.04 (WSL2) and got "/home/borkdude"
I had this problem, not only in babashka but other software as well. In my case was a combination of using babashka installed via Nix and an user logged in via network login
how did you resolve it?
On my Nix environment, installed sssd , nix-ld and exposed ${pkgs.sssd}/lib in my LD_LIBRARY_PATH. I'm not a Nix expert, started using it recently on my Ubuntu box. Don't know if that's the right approach, but it worked 😃
I also use nix and ubuntu (wsl), and it gives me my home dir without problems
I could only reproduce it in an LDAP environment (could be that the LDAP was configured in a weird way). Maybe it' because in an LDAP environment the user's home directory comes from a different source (it sure does not come from /etc/oasswd).
Looks okay on my Fedora with 6.18.8 kernel:
bb -e '(System/getProperty "user.home")'
"/home/lispyclouds"Arch: bb -e '(System/getProperty "user.home")' -> "/home/david"
👍 thanks! seems to be some kind of edge case for this person