Skip to content

fix: allow four-part `uname -r` versions

Matthew Clarkson requested to merge wsl-version into main

On WSL2, the kernel version is reported as a four-part version such as 5.15.167.4-microsoft-standard-WSL2.

The extra part is the increment number that Microsoft put onto of the upstream kernel headers.

We drop the extra patch part to stay consistent.

This likely needs a follow-up series of patches to validate the detection under WSL.

Fixes #9 (closed)

Edited by Matthew Clarkson

Merge request reports