public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Sebastian Luksch via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Sebastian Luksch <bugzilla.proxmox.com@lookshe.org>
Subject: [pve-devel] [PATCH manager 1/1] use Term::ReadLine->new() only once
Date: Tue,  2 Sep 2025 20:20:30 +0200	[thread overview]
Message-ID: <mailman.200.1756915662.418.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <20250902182031.1080266-1-bugzilla.proxmox.com@lookshe.org>

[-- Attachment #1: Type: message/rfc822, Size: 6067 bytes --]

From: Sebastian Luksch <bugzilla.proxmox.com@lookshe.org>
To: pve-devel@lists.proxmox.com
Cc: Sebastian Luksch <bugzilla.proxmox.com@lookshe.org>
Subject: [PATCH manager 1/1] use Term::ReadLine->new() only once
Date: Tue,  2 Sep 2025 20:20:30 +0200
Message-ID: <20250902182031.1080266-2-bugzilla.proxmox.com@lookshe.org>

---
 PVE/CLI/pvenode.pm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/PVE/CLI/pvenode.pm b/PVE/CLI/pvenode.pm
index 76b05887..466170f4 100644
--- a/PVE/CLI/pvenode.pm
+++ b/PVE/CLI/pvenode.pm
@@ -97,6 +97,7 @@ __PACKAGE__->register_method({
         my ($param) = @_;
 
         my $custom_directory = 0;
+        my $term = Term::ReadLine->new('pvenode');
         if (!$param->{directory}) {
             my $directories = PVE::API2::ACMEAccount->get_directories({});
             print "Directory endpoints:\n";
@@ -108,7 +109,6 @@ __PACKAGE__->register_method({
             }
             print $i, ") Custom\n";
 
-            my $term = Term::ReadLine->new('pvenode');
             my $get_dir_selection = sub {
                 my $selection = $term->readline("Enter selection: ");
                 if ($selection =~ /^(\d+)$/) {
@@ -137,7 +137,6 @@ __PACKAGE__->register_method({
         if ($meta->{termsOfService}) {
             my $tos = $meta->{termsOfService};
             print "Terms of Service: $tos\n";
-            my $term = Term::ReadLine->new('pvenode');
             my $agreed = $term->readline('Do you agree to the above terms? [y|N]: ');
             die "Cannot continue without agreeing to ToS, aborting.\n"
                 if ($agreed !~ /^y$/i);
@@ -149,7 +148,6 @@ __PACKAGE__->register_method({
 
         my $eab_enabled = $meta->{externalAccountRequired};
         if (!$eab_enabled && $custom_directory) {
-            my $term = Term::ReadLine->new('pvenode');
             my $agreed =
                 $term->readline('Do you want to use external account binding? [y|N]: ');
             $eab_enabled = ($agreed =~ /^y$/i);
@@ -158,7 +156,6 @@ __PACKAGE__->register_method({
         }
         if ($eab_enabled) {
             print "You should have received a key id and a key from your CA.\n";
-            my $term = Term::ReadLine->new('pvenode');
             my $eab_kid = $term->readline('Enter EAB key id: ');
             my $eab_hmac_key = $term->readline('Enter EAB key: ');
 
-- 
2.30.2



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

       reply	other threads:[~2025-09-03 16:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250902182031.1080266-1-bugzilla.proxmox.com@lookshe.org>
2025-09-02 18:20 ` Sebastian Luksch via pve-devel [this message]
2025-09-02 18:20 ` [pve-devel] [PATCH pmg-api " Sebastian Luksch via pve-devel

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=mailman.200.1756915662.418.pve-devel@lists.proxmox.com \
    --to=pve-devel@lists.proxmox.com \
    --cc=bugzilla.proxmox.com@lookshe.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal