Skip to content

Commit d646b06

Browse files
committed
warning message
1 parent c987ac8 commit d646b06

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tldr.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,9 +744,14 @@ def main() -> None:
744744
).format(cmd=command))
745745
else:
746746
output(results[0][0], display_option_length, plain=options.markdown)
747+
748+
if results[0][1] != get_platform() and results[0][1] != "common" and not options.platform:
749+
print(f"warning: showing page from platform '{results[0][1]}', because '{command}' does not exist in '{get_platform()}' and 'common'.")
750+
747751
if results[1:]:
748752
platforms_str = [result[1] for result in results[1:]]
749753
are_multiple_platforms = len(platforms_str) > 1
754+
750755
if are_multiple_platforms:
751756
print(
752757
f"Found {len(platforms_str)} pages with the same name"

0 commit comments

Comments
 (0)