click.prompt combined with click.Path skips path validation for prompt default
If using click.prompt with both click.Path and a default value, any user input will be validated through click.Path, but the default value will not be.
Example:
>>> import click >>> click.prompt('Path', type=click.Path(exists=True), default='/invalid/path') # Invalid user input raises error Path [/invalid/path]: /some/other/invalid/path Error: Path "/some/other/invalid/path" does not exist. # Invalid default value does not raise error Path [/invalid/path]: '/invalid/path'
Tested with click 6.7, and python 2.7.13 and 3.6.1.