From bfaa1d98f4cef71938bdbde4fd01d2db2559fccb Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Tue, 11 Oct 2022 15:32:07 -0400 Subject: [PATCH] scripts/enum-extract.pl should not hard code perl path This is a portability issue. The issue had already been fixed for scripts/cstyle.pl by 2dbf1bf8296f66f24d5e404505c991bfbeec7808. scripts/enum-extract.pl was added to the repository the following year without this portability fix. Michael Bishop informed me that this broke his attempt to build ZFS 2.1.6 on NixOS, since he was building manually outside of their package manager (that usually rewrites the shebangs to NixOS' unusual paths). NixOS puts all of the paths into $PATH, so scripts that portably rely on env to find the interpreter still work. Reviewed-by: Tino Reichardt Reviewed-by: George Melikov Reviewed-by: Ryan Moeller Signed-off-by: Richard Yao Closes #14012 --- scripts/enum-extract.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/enum-extract.pl b/scripts/enum-extract.pl index 5112cc807..5dc2e3455 100755 --- a/scripts/enum-extract.pl +++ b/scripts/enum-extract.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl my $usage = <