RFR: 8306281: function isWsl() returns false on WSL2
Ivan Bereziuk
duke at openjdk.org
Tue Jun 13 12:36:51 UTC 2023
On Mon, 12 Jun 2023 19:47:25 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> Currently _isWsl()_ function is looking for "Microsoft" string in the _kernel release_ string (`$ uname -r`).
>> That's not always true. Namely, on Ubuntu 22.04 - currently the newest Ubuntu LTS and default OS for WSL in Microsoft Store. In there `$ uname -r` command outputs "5.10.102.1-microsoft-standard-WSL2".
>> This makes _isWsl()_ function to return `false` in such environments and breaks JDK builds on WSL.
>>
>> To correct that I made the substring search case-insensitive.
>
> Marked as reviewed by erikj (Reviewer).
Thanks, @erikj79 for reviewing.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14413#issuecomment-1589215563
More information about the build-dev
mailing list