Skip to content

Commit 1b05251

Browse files
authored
fix(pkg): handle empty ID_LIKE (#11726)
On NixOS for whatever reason `ID_LIKE` was an empty string. In this case we shouldn't use it to find the `os_family` and instead fallback to the `os_distribution`. Signed-off-by: Ali Caglayan <[email protected]>
1 parent 6187bd6 commit 1b05251

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/dune_pkg/sys_poll.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ let os_family ~os_distribution ~os_release_fields ~os =
195195
| Some "linux" ->
196196
(match List.assoc (Lazy.force os_release_fields) "ID_LIKE" with
197197
| None -> os_distribution
198+
| Some "" -> os_distribution
198199
| Some s ->
199200
(* first word *)
200201
(match Scanf.sscanf s " %s" Fun.id with

0 commit comments

Comments
 (0)