all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Fabian Ebner <f.ebner@proxmox.com>
Subject: [pve-devel] applied: [PATCH v2 manager 2/3] vzdump: notes-template: improve check for unknown variable
Date: Wed, 4 May 2022 08:21:01 +0200	[thread overview]
Message-ID: <ff3ccb4d-964d-1bf6-ad66-f64eab53ef07@proxmox.com> (raw)
In-Reply-To: <20220503111800.64511-2-f.ebner@proxmox.com>

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@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.





  reply	other threads:[~2022-05-04  6:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 11:17 [pve-devel] [PATCH v2 manager 1/3] vzdump: notes-template: avoid escaping meta-characters upon replace Fabian Ebner
2022-05-03 11:17 ` [pve-devel] [PATCH v2 manager 2/3] vzdump: notes-template: improve check for unknown variable Fabian Ebner
2022-05-04  6:21   ` Thomas Lamprecht [this message]
2022-05-03 11:18 ` [pve-devel] [PATCH/RFC v2 manager 3/3] vzdump: notes-template: replace unknown variable with error string Fabian Ebner
2022-05-04  6:23   ` Thomas Lamprecht
2022-05-04  6:20 ` [pve-devel] applied: [PATCH v2 manager 1/3] vzdump: notes-template: avoid escaping meta-characters upon replace Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff3ccb4d-964d-1bf6-ad66-f64eab53ef07@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal