[pve-devel] applied: [PATCH installer] tui: honor test mode flag when starting low-level install session
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Sep 20 16:33:45 CEST 2023
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 at 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.
More information about the pve-devel
mailing list