Fix install hang on fresh install: silent colorscheme + suppress vim render output - #2
Closed
aaronbcarlisle with Copilot wants to merge 1 commit into
Closed
Fix install hang on fresh install: silent colorscheme + suppress vim render output#2aaronbcarlisle with Copilot wants to merge 1 commit into
aaronbcarlisle with Copilot wants to merge 1 commit into
Conversation
Copilot created this pull request from a session on behalf of
aaronbcarlisle
June 30, 2026 07:40
View session
aaronbcarlisle
marked this pull request as ready for review
June 30, 2026 07:41
Contributor
There was a problem hiding this comment.
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
.vimrctolerate missinghybridcolorscheme on first run by usingsilent! colorscheme hybrid. - Suppress Vim’s stdout during plugin installation in
install.shandinstall.ps1to avoid terminal-render output when not running on a TTY / with redirected output. - Fix a ShellCheck warning by setting
CDPATHto an empty string ininstall.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 on lines
151
to
+152
| info "Installing plugins via Vundle..." | ||
| if vim +PluginInstall +qall; then | ||
| if vim +PluginInstall +qall > /dev/null; then |
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 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
marked this pull request as draft
June 30, 2026 08:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both installers hang indefinitely on a fresh install because
vim +PluginInstall +qalltriggersE185: Cannot find color scheme 'hybrid'— thew0ng/vim-hybridplugin doesn't exist yet when the.vimrcis first sourced — causing Vim to prompt "Press ENTER or type command to continue" with no TTY to answer it.Changes
.vimrc—colorscheme hybrid→silent! colorscheme hybrid: silently no-ops on the first run before plugins exist; behaves normally thereafter.install.sh— pipesvim +PluginInstall +qallstdout to/dev/nullto 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;$LASTEXITCODEis still captured for the existing error check.