diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-07-07 02:09:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-07 02:09:50 +0900 |
commit | 5e5bca98f752cb61c36afc7955183e79a6095cf2 (patch) | |
tree | 66fc9448a4bbab736469fdad514dfa970787d495 /sphinx/cmd/quickstart.py | |
parent | 988a79de65737e403cd27721ce091760cf62b97f (diff) | |
parent | f0fef96906d80d89e290a780767a92ba85977733 (diff) | |
download | sphinx-git-5e5bca98f752cb61c36afc7955183e79a6095cf2.tar.gz |
Merge branch '4.x' into 6525_linkcheck_warn_redirects
Diffstat (limited to 'sphinx/cmd/quickstart.py')
-rw-r--r-- | sphinx/cmd/quickstart.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index a40a21073..7dfc29e19 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -95,6 +95,12 @@ def is_path(x: str) -> str: return x +def is_path_or_empty(x: str) -> str: + if x == '': + return x + return is_path(x) + + def allow_empty(x: str) -> str: return x @@ -223,7 +229,7 @@ def ask_user(d: Dict) -> None: print(__('sphinx-quickstart will not overwrite existing Sphinx projects.')) print() d['path'] = do_prompt(__('Please enter a new root path (or just Enter to exit)'), - '', is_path) + '', is_path_or_empty) if not d['path']: sys.exit(1) |