Skip to content

Commit

Permalink
Only show the deprecated option section with help if there are depr…
Browse files Browse the repository at this point in the history
…ecated options (pantsbuild#16339)
  • Loading branch information
asherf authored Jul 28, 2022
1 parent b6bf560 commit b258383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/pants/help/help_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_option(ohis, *, category=None):
add_option(oshi.basic)
if self._show_advanced:
add_option(oshi.advanced, category="advanced")
if self._show_deprecated:
if self._show_deprecated and oshi.deprecated:
add_option(oshi.deprecated, category="deprecated")
if oshi.advanced and not self._show_advanced:
lines.append(
Expand Down

0 comments on commit b258383

Please sign in to comment.