Skip to content

Commit

Permalink
backend: Prevent flashing terminal on Windows
Browse files Browse the repository at this point in the history
On Windows, even when the exec plugin's command is not interactive,
running the command was still making the terminal window flash (default
behavior on Windows). This can be annoying if a tool runs the exec
plugin frequently. This patch prevents that problem by setting a sys proc
attribute to hide windows, only when in the Windows platform and when the
exec is non-interactive.

Signed-off-by: Joaquim Rocha <[email protected]>
  • Loading branch information
Joaquim Rocha authored and joaquimrocha committed Jan 17, 2025
1 parent e67e512 commit 0655313
Show file tree
Hide file tree
Showing 5 changed files with 630 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ async function startServer(flags: string[] = []): Promise<ChildProcessWithoutNul

const options = {
detached: true,
windowsHide: true,
env: {
...extendedEnv,
},
Expand Down
Loading

0 comments on commit 0655313

Please sign in to comment.