summaryrefslogtreecommitdiff
path: root/sphinx/cmd/quickstart.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-07-07 02:09:50 +0900
committerGitHub <noreply@github.com>2021-07-07 02:09:50 +0900
commit5e5bca98f752cb61c36afc7955183e79a6095cf2 (patch)
tree66fc9448a4bbab736469fdad514dfa970787d495 /sphinx/cmd/quickstart.py
parent988a79de65737e403cd27721ce091760cf62b97f (diff)
parentf0fef96906d80d89e290a780767a92ba85977733 (diff)
downloadsphinx-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.py8
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)