diff options
author | Alexandru Macovei <alexnmaco@gmail.com> | 2021-09-04 04:56:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-03 21:56:43 -0400 |
commit | 7388c5a79eda6e7ba37b4a4cfb2a8e471fe13238 (patch) | |
tree | 97a2e14f1fc16bcbbadd21767109ec3fcb766ab4 | |
parent | 6a6a4dae2a89e699590a1bbd35efe6acfa18e47e (diff) |
fix(config): inherit stdin/stdout/stderr instead of piping to fix editor invocation (#3032)
Due to the introduction of utils::create_command, commands now have
stdin set to null, and stdout and stderr set to piped.
This prevents console editors from working when invoked via
starship config
-rw-r--r-- | src/configure.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/configure.rs b/src/configure.rs index 9cd1cf5bf..33b7c86c8 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -2,6 +2,7 @@ use std::env; use std::ffi::OsString; use std::io::ErrorKind; use std::process; +use std::process::Stdio; use crate::config::RootModuleConfig; use crate::config::StarshipConfig; @@ -158,6 +159,9 @@ pub fn edit_configuration() { let command = utils::create_command(&editor_cmd[0]) .expect("Unable to locate editor in $PATH.") + .stdin(Stdio::inherit()) + .stdout(Stdio::inherit()) + .stderr(Stdio::inherit()) .args(&editor_cmd[1..]) .arg(config_path) .status(); |