diff options
author | Slack Coder <slackcoder@server.ky> | 2025-04-01 15:13:35 -0500 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2025-04-02 08:03:37 -0500 |
commit | db580599c2f83ae2be55ebd2c28dedb35a6431ac (patch) | |
tree | 14d9f8900f14625a4dc8c42fbdead219dec890a7 /sbofind | |
parent | 953e3e79326c4f8b223cf92870563d43b34de356 (diff) | |
download | sbotools2-db580599c2f83ae2be55ebd2c28dedb35a6431ac.tar.xz |
sbofind: Helpful error message
Report error when LOCAL_OVERRIDES is missing with human friendly
message.
Diffstat (limited to 'sbofind')
-rwxr-xr-x | sbofind | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -131,7 +131,11 @@ sub perform_search { } } if ($config{LOCAL_OVERRIDES} ne 'FALSE') { - opendir(my $dh, $config{LOCAL_OVERRIDES}); + if (! opendir(my $dh, $config{LOCAL_OVERRIDES})) { + warn("could not read the configured LOCAL_OVERRIDES directory '$config{LOCAL_OVERRIDES}'."); + exit 1; + } + while (my $dir = readdir($dh)) { next if $local{$dir}; if ($dir =~ $search_name_re or in($dir, @names)) { |