Skip to content

Commit 59d9dec

Browse files
Improve wording of missing page error message (#163)
Co-authored-by: Matthew Peveler <[email protected]>
1 parent c4a2f46 commit 59d9dec

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[flake8]
2-
max-line-length=88
2+
max-line-length=88

tests/test_tldr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_error_message():
2727
with mock.patch("sys.argv", ["tldr", "73eb6f19cd6f"]):
2828
with pytest.raises(SystemExit) as pytest_wrapped_e:
2929
tldr.main()
30-
correct_output = "`73eb6f19cd6f` documentation is not available. Consider contributing Pull Request to https://github.com/tldr-pages/tldr" # noqa
30+
correct_output = "`73eb6f19cd6f` documentation is not available.\nIf you want to contribute it, feel free to send a pull request to: https://github.com/tldr-pages/tldr" # noqa
3131
print("Test {}".format(pytest_wrapped_e))
3232
assert pytest_wrapped_e.type == SystemExit
3333
assert str(pytest_wrapped_e.value) == correct_output

tldr.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,9 @@ def main():
467467
)
468468
if not result:
469469
sys.exit((
470-
"`{cmd}` documentation is not available. "
471-
"Consider contributing Pull Request to "
472-
"https://github.com/tldr-pages/tldr"
470+
"`{cmd}` documentation is not available.\n"
471+
"If you want to contribute it, feel free to"
472+
" send a pull request to: https://github.com/tldr-pages/tldr"
473473
).format(cmd=command))
474474
else:
475475
output(result)

0 commit comments

Comments
 (0)