From 82d777ebb3e62dbffc4432ce2d159840fd35df72 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 25 Nov 2024 14:20:54 +0000 Subject: test: fix cli interactor without prompt reverts a change in f79014235e85554e3661b3f2a02b8fa88bc192ff which caused a subtle change to how choices were displayed that caused the cli tester error when choices without prompts were displayed eg. in `ngit list` tests --- src/lib/cli_interactor.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/cli_interactor.rs b/src/lib/cli_interactor.rs index 7d67961..e6154a2 100644 --- a/src/lib/cli_interactor.rs +++ b/src/lib/cli_interactor.rs @@ -46,10 +46,10 @@ impl InteractorPrompt for Interactor { } fn choice(&self, parms: PromptChoiceParms) -> Result { let mut choice = dialoguer::Select::with_theme(&self.theme); - if !parms.prompt.is_empty() { - choice.with_prompt(parms.prompt); - } - choice.report(parms.report).items(&parms.choices); + choice + .with_prompt(parms.prompt) + .report(parms.report) + .items(&parms.choices); if let Some(default) = parms.default { if std::env::var("NGITTEST").is_err() { choice.default(default); -- cgit v1.2.3