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 pmg-api 1/1] use Term::ReadLine->new() only once
Date: Tue, 2 Sep 2025 20:20:31 +0200 [thread overview]
Message-ID: <mailman.201.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: 6100 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 pmg-api 1/1] use Term::ReadLine->new() only once
Date: Tue, 2 Sep 2025 20:20:31 +0200
Message-ID: <20250902182031.1080266-3-bugzilla.proxmox.com@lookshe.org>
---
src/PMG/CLI/pmgconfig.pm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/PMG/CLI/pmgconfig.pm b/src/PMG/CLI/pmgconfig.pm
index 9f3c679..097a599 100644
--- a/src/PMG/CLI/pmgconfig.pm
+++ b/src/PMG/CLI/pmgconfig.pm
@@ -266,6 +266,7 @@ __PACKAGE__->register_method({
my ($param) = @_;
my $custom_directory = 1;
+ my $term = Term::ReadLine->new('pmgconfig');
if (!$param->{directory}) {
my $directories = PMG::API2::ACME->get_directories({});
print "Directory endpoints:\n";
@@ -277,7 +278,6 @@ __PACKAGE__->register_method({
}
print $i, ") Custom\n";
- my $term = Term::ReadLine->new('pmgconfig');
my $get_dir_selection = sub {
my $selection = $term->readline("Enter selection: ");
if ($selection =~ /^(\d+)$/) {
@@ -307,7 +307,6 @@ __PACKAGE__->register_method({
if ($meta->{termsOfService}) {
my $tos = $meta->{termsOfService};
print "Terms of Service: $tos\n";
- my $term = Term::ReadLine->new('pmgconfig');
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);
@@ -319,7 +318,6 @@ __PACKAGE__->register_method({
my $eab_enabled = $meta->{externalAccountRequired};
if (!$eab_enabled && $custom_directory) {
- my $term = Term::ReadLine->new('pmgconfig');
my $agreed =
$term->readline('Do you want to use external account binding? [y|N]: ');
$eab_enabled = ($agreed =~ /^y$/i);
@@ -328,7 +326,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('pmgconfig');
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
prev parent 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 ` [pve-devel] [PATCH manager " Sebastian Luksch via pve-devel
2025-09-02 18:20 ` Sebastian Luksch via pve-devel [this message]
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.201.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 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.