fix: quote pip install commands in missing dependency error message#1841
Open
ashok2ashok wants to merge 2 commits into
Open
fix: quote pip install commands in missing dependency error message#1841ashok2ashok wants to merge 2 commits into
ashok2ashok wants to merge 2 commits into
Conversation
zsh (macOS default since Catalina) treats square brackets as glob patterns, so `pip install markitdown[pptx]` fails with "no matches found". Single-quoted commands copy-paste correctly on zsh and bash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Single quotes break on Windows cmd.exe (passed as literal characters). Double quotes prevent glob expansion on zsh and PowerShell while also working correctly on bash, fish, and cmd.exe.
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.
Summary
Error messages suggesting
pip install markitdown[pptx]fail on shells that treat[...]as glob/wildcard patterns:zsh: no matches found: markitdown[pptx]Wrapped all pip install examples in double quotes — the only quoting style that works correctly across all major shells:
Double quotes are the only option that works on all five.
Changes
Updated
MISSING_DEPENDENCY_MESSAGEinpackages/markitdown/src/markitdown/_exceptions.py:Before:
After:
Also added a short note explaining why quotes are needed.
Test plan
MissingDependencyException(e.g. convert a .pptx without thepptxextra installed) and verify the error message shows double-quoted commandspip install "markitdown[pptx]"works on zsh, PowerShell, and cmd.exe without modification