public inbox for pve-devel@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>,
	Christoph Heiss <c.heiss@proxmox.com>
Subject: [pve-devel] applied: [PATCH installer] tui: honor test mode flag when starting low-level install session
Date: Wed, 20 Sep 2023 16:33:45 +0200	[thread overview]
Message-ID: <681ebf88-cb2d-4591-8a48-fd427ff7ec11@proxmox.com> (raw)
In-Reply-To: <20230920114012.712670-1-c.heiss@proxmox.com>

Am 20/09/2023 um 13:39 schrieb Christoph Heiss:
> Even if the installer is run in release mode, the test-mode flag should
> be honored on whether to start a test-installation or not.
> 
> The test mode is always forced on in debug builds, so the cfg()
> conditionals can be dropped.
> 
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
>  proxmox-tui-installer/src/main.rs | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
>

applied, thanks!

albeit not sure if returning that tuple is that nice, maybe something like

    let exe = match in_test_mode {
        true => "./proxmox-low-level-installer",
        false => "proxmox-low-level-installer",
    };

    let mut cmd = Command::new(exe);
    if choice {
        cmd.args(&["-t", "start-session"])
            .envs(vec![("PERL5LIB", ".")]);
    } else {
        cmd.args(&["start-session"]);
    };

    cmd.stdin(Stdio::piped()).stdout(Stdio::piped()).spawn();


would be nicer, even if slightly longer (possible it can be even written shorter).
But no hard feelings, it's not like this is complicated code or the like.




      reply	other threads:[~2023-09-20 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 11:39 [pve-devel] " Christoph Heiss
2023-09-20 14:33 ` Thomas Lamprecht [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=681ebf88-cb2d-4591-8a48-fd427ff7ec11@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=c.heiss@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 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