Skip to content

Allow env show JSON with missing plugins#2295

Open
xujiantop-crypto wants to merge 1 commit into
pypa:masterfrom
xujiantop-crypto:fix/env-show-json-unknown-plugin
Open

Allow env show JSON with missing plugins#2295
xujiantop-crypto wants to merge 1 commit into
pypa:masterfrom
xujiantop-crypto:fix/env-show-json-unknown-plugin

Conversation

@xujiantop-crypto

Copy link
Copy Markdown

Closes #2011

Summary

  • keep hatch env show --json usable when an environment type comes from a missing plugin
  • preserve the raw environment config in the JSON output for unknown environment types
  • add a regression test for JSON output with an unknown environment type

Tests

  • python -m pytest tests/cli/env/test_show.py -q
  • python -m pytest tests/cli/env/test_show.py::test_default_as_json_unknown_type tests/cli/env/test_show.py::test_default_as_json -q

@cjames23

cjames23 commented Jun 1, 2026

Copy link
Copy Markdown
Member

Your diff seems very odd for these changes.

@xujiantop-crypto

Copy link
Copy Markdown
Author

Thanks for checking. I rechecked the branch locally against origin/master: the diff is only src/hatch/cli/env/show.py and tests/cli/env/test_show.py. If GitHub is showing a different compare view, I can rebase or recreate the branch.

@xujiantop-crypto xujiantop-crypto force-pushed the fix/env-show-json-unknown-plugin branch from b74d3d6 to 3d8033c Compare June 3, 2026 01:15
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.

"env show --json" fails with an error if some plugin is not installed

2 participants