Skip to content

fix: resolve #963 — br error on Right/open of md associated editor (zsh/vscode) - #1168

Open
chinhkrb113 wants to merge 1 commit into
Canop:mainfrom
chinhkrb113:improve/quality/redirect-and-detach-stdout-stderr-of-bac
Open

fix: resolve #963 — br error on Right/open of md associated editor (zsh/vscode)#1168
chinhkrb113 wants to merge 1 commit into
Canop:mainfrom
chinhkrb113:improve/quality/redirect-and-detach-stdout-stderr-of-bac

Conversation

@chinhkrb113

Copy link
Copy Markdown
Contributor

Summary

When broot opens a file with an associated GUI editor (e.g. VSCode on Windows/msys2), the editor is launched as a background program (switch_terminal = false). broot currently spawns this child without redirecting its stdin/stdout/stderr, so any diagnostic output the editor writes (deprecation warnings, jump-list privacy errors, extension host messages) is written straight into broot's terminal and surfaces as the "error" the user sees in this issue. The fix is to fully detach background programs from broot's terminal by piping their standard streams to null. This keeps broot's TUI clean and matches the intent that background launches should not share broot's console

Fixes #963

Changes

  • src/launchable.rs

Why

src/launchable.rs: When broot opens a file with an associated GUI editor (e.g. VSCode on Windows/msys2), the editor is launched as a background program (switch_terminal = false). broot currently spawns this child without redirecting its stdin/stdout/stderr, so any diagnostic output the editor writes (deprecation warnings, jump-list privacy errors, extension host messages) is written straight into broot's terminal and surfaces as the "error" the user sees in this issue. The fix is to fully detach background programs from broot's terminal by piping their standard streams to null. This keeps broot's TUI clean and matches the intent that background launches should not share broot's console.

…or (zsh/vscode)

Fixes Canop#963

Signed-off-by: ChinhLee <76194645+chinhkrb113@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

br error on Right/open of md associated editor (zsh/vscode)

1 participant