Skip to content

Commit

Permalink
Merge branch 'mj/gitweb-unreadable-config-error'
Browse files Browse the repository at this point in the history
When given an existing but unreadable file as a configuration file,
gitweb behaved as if the file did not exist at all, but now it
errors out.  This is a change that may break backward compatibility.

* mj/gitweb-unreadable-config-error:
  gitweb: die when a configuration file cannot be read
  • Loading branch information
gitster committed Jan 26, 2024
2 parents dc8ce99 + ac62a36 commit b700f11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,11 @@ sub filter_and_validate_refs {
sub read_config_file {
my $filename = shift;
return unless defined $filename;
# die if there are errors parsing config file
if (-e $filename) {
do $filename;
# die if there is a problem accessing the file
die $! if $!;
# die if there are errors parsing config file
die $@ if $@;
return 1;
}
Expand Down

0 comments on commit b700f11

Please sign in to comment.