fix(configure): fix launching .cmd editors (#2635)

This commit is contained in:
David Knaack 2021-04-24 00:10:19 +02:00 committed by GitHub
parent fabf9c6fb7
commit 603da24852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -135,8 +135,9 @@ pub fn write_configuration(table: &mut Table) {
pub fn edit_configuration() {
let config_path = get_config_path();
let editor_cmd = shell_words::split(&get_editor()).expect("Unmatched quotes found in $EDITOR.");
let editor_path = which::which(&editor_cmd[0]).expect("Unable to locate editor in $PATH.");
let command = Command::new(&editor_cmd[0])
let command = Command::new(editor_path)
.args(&editor_cmd[1..])
.arg(config_path)
.status();