Skip to content

Commit

Permalink
[prepare-ChangeLog] Handle versioned Perl/Python shebangs
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=260918

Reviewed by Alexey Proskuryakov.

* Tools/Scripts/prepare-ChangeLog:
(get_function_line_ranges):

Canonical link: https://commits.webkit.org/267509@main
  • Loading branch information
gsnedders committed Aug 31, 2023
1 parent 762ed20 commit af90c2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/Scripts/prepare-ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,8 @@ sub get_function_line_ranges($$)
return () unless $first_line =~ m|^#!(?:/usr/bin/env\s+)?(\S+)|;
my $interpreter = $1;

return get_function_line_ranges_for_perl($file_handle, $file_name) if $interpreter =~ /perl$/;
return get_function_line_ranges_for_python($file_handle, $file_name) if $interpreter =~ /python$/;
return get_function_line_ranges_for_perl($file_handle, $file_name) if $interpreter =~ /perl[0-9\.]*$/;
return get_function_line_ranges_for_python($file_handle, $file_name) if $interpreter =~ /python[0-9\.]*$/;

return ();
}
Expand Down

0 comments on commit af90c2a

Please sign in to comment.