mirror of
https://oauth2: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@github.com/m1ngsama/chopsticks.git
synced 2026-05-10 19:10:59 +08:00
fix: use TERM=dumb+/dev/null for non-interactive vim runs, eliminating escape sequence leakage
This commit is contained in:
parent
4a9c9354a2
commit
a605185a2e
1 changed files with 4 additions and 1 deletions
|
|
@ -365,9 +365,12 @@ step "Installing Vim plugins"
|
|||
# Fall back to --not-a-term for non-interactive/CI environments.
|
||||
_vim_run() {
|
||||
if { true </dev/tty; } 2>/dev/null; then
|
||||
# Interactive terminal: let vim manage the alternate screen properly
|
||||
vim "$@" </dev/tty
|
||||
else
|
||||
vim --not-a-term "$@" </dev/null 2>/dev/null
|
||||
# Non-interactive / CI: TERM=dumb suppresses all escape sequences;
|
||||
# stdout+stderr redirected so nothing leaks into installer output
|
||||
TERM=dumb vim "$@" </dev/null >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
if ! _vim_run +PlugInstall +qall; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue