mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
fix(shell): don't set UV_PROCESS_WINDOWS_HIDE for shell spawns
When using the shell `$` function to spawn processes on Windows in conhost, the console fonts were being changed to raster fonts after execution. This was caused by always setting `hide_window = true` for shell spawns, which translates to the UV_PROCESS_WINDOWS_HIDE flag. This flag affects how Windows creates child process windows, and when interactive programs like PowerShell exit, the conhost console resets its display properties including fonts to defaults (raster fonts). The fix changes `hide_window` from `true` to `false` for shell spawns, matching the default behavior of `Bun.spawn()` which doesn't have this issue. Fixes #26558 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -810,7 +810,7 @@ pub const ShellSubprocess = struct {
|
||||
},
|
||||
|
||||
.windows = if (Environment.isWindows) bun.spawn.WindowsSpawnOptions.WindowsOptions{
|
||||
.hide_window = true,
|
||||
.hide_window = false,
|
||||
.loop = event_loop,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user