Clarify the error message for missing zlibWrapper in non-Git builds#786
Merged
tueda merged 1 commit intoform-dev:masterfrom Jan 27, 2026
Merged
Conversation
This avoids running git submodule when not in a Git working tree (which would otherwise result in a Git error) and provides a more helpful error message.
There was a problem hiding this comment.
Pull request overview
This PR improves the error message shown when the extern/zstd/zlibWrapper directory is missing during configure, particularly for non-Git builds (e.g., from GitHub source snapshots). It also enhances Git repository detection to avoid unnecessary attempts at running git commands.
Changes:
- Added git repository validation check before attempting submodule updates
- Changed
.gitdirectory test to handle git worktrees and submodules (where.gitcan be a file) - Enhanced error message to provide actionable guidance for obtaining zlibWrapper from upstream
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Even for
./configure --without-std, we needextern/zstd/zlibWrapperat configure time.This PR slightly improves the error message for non-standard builds from a GitHub source snapshot (equivalent to
git archive), changing it from:to
which answers a possible FAQ.