Compare commits

...

3 Commits

Author SHA1 Message Date
Olivier Cornelis 3a82402de2
Merge a2d96a591c into 8e1d11e0b2 2026-02-24 01:04:46 +01:00
thiswillbeyourgithub a2d96a591c fix: handle missing template with warning
Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4.6) <aider@aider.chat>
2026-02-24 01:04:12 +01:00
thiswillbeyourgithub f5ac493bbd feat: crash if template can't be found
Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
2025-09-16 14:52:52 +02:00
1 changed files with 6 additions and 0 deletions

6
sanoid
View File

@ -1056,6 +1056,12 @@ sub init {
$rawtemplate =~ s/\s+$//g;
my $template = 'template_'.$rawtemplate;
# Check if template exists - warn otherwise
if (!exists $ini{$template}) {
warn "WARN: Template '$rawtemplate' referenced in section [$section] does not exist in $conf_file.\n";
}
foreach my $key (keys %{$ini{$template}}) {
if ($key =~ /template|recursive/) {
warn "ignored key '$key' from '$rawtemplate' template.\n";