mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
cli: handle invalid ui.editor configuration
This commit is contained in:
parent
a367f13c72
commit
fb41ef4fa0
1 changed files with 4 additions and 1 deletions
|
|
@ -2142,7 +2142,10 @@ pub fn get_new_config_file_path(
|
|||
}
|
||||
|
||||
pub fn run_ui_editor(settings: &UserSettings, edit_path: &PathBuf) -> Result<(), CommandError> {
|
||||
let editor: CommandNameAndArgs = settings.config().get("ui.editor").unwrap();
|
||||
let editor: CommandNameAndArgs = settings
|
||||
.config()
|
||||
.get("ui.editor")
|
||||
.map_err(|err| CommandError::ConfigError(format!("ui.editor: {err}")))?;
|
||||
let exit_status = editor
|
||||
.to_command()
|
||||
.arg(edit_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue