summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Knaack <davidkna@users.noreply.github.com>2021-04-24 00:10:19 +0200
committerGitHub <noreply@github.com>2021-04-24 00:10:19 +0200
commit603da248527b39de6ecc6ca945a32937439352d7 (patch)
tree88449425d322ae00d70ab7a1bb6cd2dc32c60902
parentfabf9c6fb7471e48f4b71258c0a10e810da46d6f (diff)
fix(configure): fix launching .cmd editors (#2635)
-rw-r--r--src/configure.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/configure.rs b/src/configure.rs
index 0e51aa093..aa2fba4d5 100644
--- a/src/configure.rs
+++ b/src/configure.rs
@@ -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();