mirror of
https://github.com/wez/wezterm.git
synced 2024-09-20 19:27:22 +03:00
unbreak the default windows pty
I was too focused on the wsl case and didn't test this. We can't redirect the process handles without causing some problems with starting up cmd.exe. Comment out that portion of the code for the moment.
This commit is contained in:
parent
e2ac4ebb49
commit
25bb43262d
@ -394,6 +394,7 @@ impl DaemonOptions {
|
||||
.unwrap_or_else(|| RUNTIME_DIR.join("pid"))
|
||||
}
|
||||
|
||||
#[cfg_attr(windows, allow(dead_code))]
|
||||
pub fn stdout(&self) -> PathBuf {
|
||||
self.stdout
|
||||
.as_ref()
|
||||
@ -401,6 +402,7 @@ impl DaemonOptions {
|
||||
.unwrap_or_else(|| RUNTIME_DIR.join("log"))
|
||||
}
|
||||
|
||||
#[cfg_attr(windows, allow(dead_code))]
|
||||
pub fn stderr(&self) -> PathBuf {
|
||||
self.stderr
|
||||
.as_ref()
|
||||
@ -408,10 +410,12 @@ impl DaemonOptions {
|
||||
.unwrap_or_else(|| RUNTIME_DIR.join("log"))
|
||||
}
|
||||
|
||||
#[cfg_attr(windows, allow(dead_code))]
|
||||
pub fn open_stdout(&self) -> Fallible<File> {
|
||||
open_log(self.stdout())
|
||||
}
|
||||
|
||||
#[cfg_attr(windows, allow(dead_code))]
|
||||
pub fn open_stderr(&self) -> Fallible<File> {
|
||||
open_log(self.stderr())
|
||||
}
|
||||
|
@ -251,6 +251,7 @@ fn main() -> Result<(), Error> {
|
||||
#[cfg(windows)]
|
||||
unsafe {
|
||||
if winapi::um::wincon::AttachConsole(winapi::um::wincon::ATTACH_PARENT_PROCESS) == 0 {
|
||||
/*
|
||||
// If we failed to attach the console then we're running in
|
||||
// a gui only context. To aid in troubleshooting, let's redirect
|
||||
// the stdio streams to a log file
|
||||
@ -261,6 +262,7 @@ fn main() -> Result<(), Error> {
|
||||
use winapi::um::winbase::{STD_ERROR_HANDLE, STD_OUTPUT_HANDLE};
|
||||
SetStdHandle(STD_OUTPUT_HANDLE, stdout.into_raw_file_descriptor());
|
||||
SetStdHandle(STD_ERROR_HANDLE, stderr.into_raw_file_descriptor());
|
||||
*/
|
||||
|
||||
std::env::set_current_dir(
|
||||
dirs::home_dir().ok_or_else(|| err_msg("can't find home dir"))?,
|
||||
|
Loading…
Reference in New Issue
Block a user