]> git.proxmox.com Git - pve-manager.git/commitdiff
vzdump: notes-template: improve check for unknown variable
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 3 May 2022 11:17:59 +0000 (13:17 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 4 May 2022 05:58:50 +0000 (07:58 +0200)
so that '{{foo}}{{bar}}' is not detected as being an unknown variable
named 'foo}}{{bar', but as 'foo' (and 'bar').

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/VZDump.pm

index 9af2de3dc86eb82fbe0f078a82d4cf547d341029..05cc1becd0066e0ac5e507ece9075d068b91fd81 100644 (file)
@@ -92,7 +92,7 @@ my $generate_notes = sub {
     my $vars = join('|', keys $info->%*);
     $notes_template =~ s/\{\{($vars)\}\}/$info->{$1}/g;
 
-    die "unexpected variable name '$1'" if $notes_template =~ m/\{\{([^\s]+)\}\}/;
+    die "unexpected variable name '$1'" if $notes_template =~ m/\{\{([^\s}]+)\}\}/;
 
     return $notes_template;
 };