forked from mirrors/jj
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…
Reference in a new issue