Skip to content

Fix install hang on fresh install: silent colorscheme + suppress vim render output - #2

Closed
aaronbcarlisle with Copilot wants to merge 1 commit into
masterfrom
copilot/audit-fix-install-scripts
Closed

Fix install hang on fresh install: silent colorscheme + suppress vim render output#2
aaronbcarlisle with Copilot wants to merge 1 commit into
masterfrom
copilot/audit-fix-install-scripts

Conversation

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Both installers hang indefinitely on a fresh install because vim +PluginInstall +qall triggers E185: Cannot find color scheme 'hybrid' — the w0ng/vim-hybrid plugin doesn't exist yet when the .vimrc is first sourced — causing Vim to prompt "Press ENTER or type command to continue" with no TTY to answer it.

Changes

  • .vimrccolorscheme hybridsilent! colorscheme hybrid: silently no-ops on the first run before plugins exist; behaves normally thereafter.
  • install.sh — pipes vim +PluginInstall +qall stdout to /dev/null to suppress the terminal-render garbage (tilde lines, escape sequences) that Vim emits when not connected to a TTY; stderr is preserved for real errors. Also fixes a shellcheck SC1007 warning (CDPATH=CDPATH='').
  • install.ps1 — same stdout suppression via | Out-Null; $LASTEXITCODE is still captured for the existing error check.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents the Unix and Windows installers from hanging on a fresh install by avoiding an interactive Vim prompt triggered during vim +PluginInstall +qall when the hybrid colorscheme is not yet available.

Changes:

  • Make .vimrc tolerate missing hybrid colorscheme on first run by using silent! colorscheme hybrid.
  • Suppress Vim’s stdout during plugin installation in install.sh and install.ps1 to avoid terminal-render output when not running on a TTY / with redirected output.
  • Fix a ShellCheck warning by setting CDPATH to an empty string in install.sh.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
install.sh Redirects Vim stdout during plugin install and adjusts CDPATH initialization.
install.ps1 Redirects Vim stdout during plugin install while preserving exit-code checks.
.vimrc Silences missing-colorscheme errors during first-time plugin install.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread install.sh
Comment on lines 151 to +152
info "Installing plugins via Vundle..."
if vim +PluginInstall +qall; then
if vim +PluginInstall +qall > /dev/null; then
Comment thread install.ps1
Comment on lines 174 to 176
Write-Info 'Installing plugins via Vundle...'
vim +PluginInstall +qall
vim +PluginInstall +qall | Out-Null
# $ErrorActionPreference='Stop' does not trip on native exit codes, so check it.
Copilot AI requested a review from aaronbcarlisle June 30, 2026 08:00
Copilot stopped work on behalf of aaronbcarlisle due to an error June 30, 2026 08:00
Copilot stopped work on behalf of aaronbcarlisle due to an error June 30, 2026 08:00
@aaronbcarlisle
aaronbcarlisle marked this pull request as draft June 30, 2026 08:01
@aaronbcarlisle
aaronbcarlisle deleted the copilot/audit-fix-install-scripts branch June 30, 2026 08:04
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.

3 participants