[pve-devel] applied: [PATCH v2 manager 2/3] vzdump: notes-template: improve check for unknown variable

Thomas Lamprecht t.lamprecht at proxmox.com
Wed May 4 08:21:01 CEST 2022


Am 5/3/22 um 13:17 schrieb Fabian Ebner:
> 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 at proxmox.com>
> ---
>  PVE/VZDump.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
> index 9af2de3d..05cc1bec 100644
> --- a/PVE/VZDump.pm
> +++ b/PVE/VZDump.pm
> @@ -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}]+)\}\}/;

applied, but added an trailing \n to the error above to avoid the perl file context
ugliness, thanks.






More information about the pve-devel mailing list