diff --git a/cli/src/cli_util.rs b/cli/src/cli_util.rs index d8d875e2ed..1931190462 100644 --- a/cli/src/cli_util.rs +++ b/cli/src/cli_util.rs @@ -2296,6 +2296,7 @@ pub fn run_ui_editor(settings: &UserSettings, edit_path: &PathBuf) -> Result<(), .map_err(|err| CommandError::ConfigError(format!("ui.editor: {err}")))?; let exit_status = editor.to_command().arg(edit_path).status().map_err(|err| { user_error(format!( + // The executable couldn't be found or run; command-line arguments are not relevant "Failed to run editor '{name}': {err}", name = editor.split_name(), )) diff --git a/cli/src/ui.rs b/cli/src/ui.rs index 0479aac4ca..9cffad161f 100644 --- a/cli/src/ui.rs +++ b/cli/src/ui.rs @@ -218,10 +218,11 @@ impl Ui { match self.output { UiOutput::Terminal { .. } if io::stdout().is_terminal() => { match UiOutput::new_paged(&self.pager_cmd) { - Ok(new_output) => { - self.output = new_output; + Ok(pager_output) => { + self.output = pager_output; } Err(e) => { + // The pager executable couldn't be found or couldn't be run writeln!( self.warning(), "Failed to spawn pager '{name}': {e}",