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:
Claude Bot
2026-01-29 15:20:31 +00:00
parent b64edcb490
commit e0a73a409a

View File

@@ -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,
},
};