Skip to content
Myr

Merge pull request #1587 from csr/hide-input-fix

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #1460: hide prompt input if hide_input is enabled

authored by David Lord · committed by GitHub · parents 3ecc05d, a6211ed · Browse files · 2 files+6 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+6 added−1 removed

  • other:+6 added−1 removed

2 files+6 added−1 removed

modified:src/click/termui.py+4 added-1 removed
151 unmodified lines
152 return default153 try:154 result = value_proc(value)155 except UsageError as e:156 if hide_input:157 echo("Error: the value you entered was invalid", err=err)158 else:156 echo(f"Error: {e.message}", err=err) # noqa: B306159 echo(f"Error: {e.message}", err=err) # noqa: B306160 continue161 if not confirmation_prompt:162 return result163 while 1:
528 unmodified lines
modified:CHANGES.rst+2 added
14 unmodified lines
15- Include ``--help`` option in completion. :pr:`1504`16- ``version_option`` uses ``importlib.metadata`` (or the17 ``importlib_metadata`` backport) instead of ``pkg_resources``.18 :issue:`1582`19- If validation fails for a prompt with ``hide_input=True``, the value20 is not shown in the error message. :issue:`1460`212223Version 7.1.224-------------
635 unmodified lines