Skip to content

Commit cb63ef4

Browse files
authored
fix: make --render work again (#257)
1 parent 38fe118 commit cb63ef4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tldr.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,9 @@ def main() -> None:
638638
print('\n'.join(get_commands(options.platform, options.language)))
639639
elif options.render:
640640
for command in options.command:
641-
if Path(command).exists():
642-
with command.open(encoding='utf-8') as open_file:
641+
file_path = Path(command)
642+
if file_path.exists():
643+
with file_path.open(encoding='utf-8') as open_file:
643644
output(open_file.read().encode('utf-8').splitlines(),
644645
plain=options.markdown)
645646
elif options.search:

0 commit comments

Comments
 (0)