importing empty folder fails
Describe the bug
If I try to import a directory that doesn't contain any yaml files, Anubis fails and exits with "glob pattern matched no files".
Sep 15 11:37:28 [host] botstopper[19100]: bot 1: config.ImportStatement: invalid source file: /etc/techaro-botstopper/botPolicies.d/*.yaml: config.ImportStatement: glob pattern matched no files
I can touch an empty file (like 00-default.yaml or something) to satisfy the glob requirement, and Anubis is happy with that, or I can have a skeleton botPolicies.yaml that does nothing but import, and put our default policies into 00-default.yaml. So it's not like it's difficult to work around, but I think an empty directory is something that could reasonably exist.
Low priority, it's just something I tripped over and maybe counts under "surprising behaviour" that someone else might run into.
Steps to reproduce
- import: /etc/techaro-botstopper/botPolicies.d/*.yaml with an empty folder.
restart
Expected behavior
ignore the lack of files and move on.
Your operating system and its version.
Debian 13
Your browser and its version.
FF ESR
Additional context
No response
Source: TecharoHQ/anubis