ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: handle invalid ui.editor configuration

This commit is contained in:
Yuya Nishihara 2023-08-11 07:50:29 +09:00
parent a367f13c72
commit fb41ef4fa0

View file

@ -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)