aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2025-04-01 15:13:35 -0500
committerSlack Coder <slackcoder@server.ky>2025-04-02 08:03:37 -0500
commitdb580599c2f83ae2be55ebd2c28dedb35a6431ac (patch)
tree14d9f8900f14625a4dc8c42fbdead219dec890a7
parent953e3e79326c4f8b223cf92870563d43b34de356 (diff)
downloadsbotools2-db580599c2f83ae2be55ebd2c28dedb35a6431ac.tar.xz
sbofind: Helpful error message
Report error when LOCAL_OVERRIDES is missing with human friendly message.
-rw-r--r--ChangeLog.md1
-rwxr-xr-xsbofind6
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index 4df2fa5..768840b 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- Check existence of slackbuilds for all arguments in sboinstall and sboupgrade. Thanks pghvlaans!
+ - sbofind: Give helpful error message when the LOCAL_OVERRIDES directory is missing.
## [2.9.0]
diff --git a/sbofind b/sbofind
index 8eca349..de94e4f 100755
--- a/sbofind
+++ b/sbofind
@@ -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)) {