Skip to content

fix: quote pip install commands in missing dependency error message#1841

Open
ashok2ashok wants to merge 2 commits into
microsoft:mainfrom
ashok2ashok:fix/zsh-pip-install-quotes
Open

fix: quote pip install commands in missing dependency error message#1841
ashok2ashok wants to merge 2 commits into
microsoft:mainfrom
ashok2ashok:fix/zsh-pip-install-quotes

Conversation

@ashok2ashok
Copy link
Copy Markdown

@ashok2ashok ashok2ashok commented Apr 27, 2026

Summary

Error messages suggesting pip install markitdown[pptx] fail on shells that treat [...] as glob/wildcard patterns:

  • zsh (macOS default since Catalina): zsh: no matches found: markitdown[pptx]
  • PowerShell (Windows): similar glob expansion failure

Wrapped all pip install examples in double quotes — the only quoting style that works correctly across all major shells:

Shell Unquoted Single quotes Double quotes
zsh ✗ glob fail
bash
fish
PowerShell ✗ glob fail
cmd.exe ✗ literal char

Double quotes are the only option that works on all five.

Changes

Updated MISSING_DEPENDENCY_MESSAGE in packages/markitdown/src/markitdown/_exceptions.py:

Before:

* pip install markitdown[pptx]
* pip install markitdown[all]

After:

* pip install "markitdown[pptx]"
* pip install "markitdown[all]"

Also added a short note explaining why quotes are needed.

Test plan

  • Trigger a MissingDependencyException (e.g. convert a .pptx without the pptx extra installed) and verify the error message shows double-quoted commands
  • Confirm pip install "markitdown[pptx]" works on zsh, PowerShell, and cmd.exe without modification

agoli-dd and others added 2 commits April 27, 2026 19:36
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.
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.

2 participants