On Fri, 13 Jan 2023 04:10:16 GMT, Jie Fu <ji...@openjdk.org> wrote: > Hi all, > > Configuration is broken in dockers after JDK-8296478. > This is because `$USER` is not defined in dockers [1]. > > The fix will check `whoami` if we get an empty `$USERNAME`. > > Thanks. > Best regards, > Jie > > [1] > https://stackoverflow.com/questions/54411218/docker-why-isnt-user-environment-variable-set
The code changes itself look good. What happens if you don't have whoami or if you have it and that fails as well? Hm. Looking at the code, it seems that `UTIL_CHECK_STRING_NON_EMPTY` should catch that. Can you verify that this is indeed the case? To be clear: If you are missing both $USER and `whoami`, and are not explicitly setting a user name, configure should fail. But if you are missing this and are using `--with-build-user`, then it succeeds. ------------- Marked as reviewed by ihse (Reviewer). PR: https://git.openjdk.org/jdk/pull/11983