mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Don't overwrite existing sphinx projects from quickstart.
This commit is contained in:
parent
47ce40c492
commit
d8de24e1ad
3
CHANGES
3
CHANGES
@ -100,6 +100,9 @@ New features added
|
||||
- Figures with captions can now be referred to like section titles,
|
||||
using the ``:ref:`` role without an explicit link text.
|
||||
|
||||
- In quickstart, if the selected root path already contains a Sphinx
|
||||
project, complain and abort.
|
||||
|
||||
|
||||
Release 0.4.2 (Jul 29, 2008)
|
||||
============================
|
||||
|
@ -387,6 +387,19 @@ accept a default value, if one is given in brackets).'''
|
||||
print '''
|
||||
Enter the root path for documentation.'''
|
||||
do_prompt(d, 'path', 'Root path for the documentation', '.', is_path)
|
||||
|
||||
while path.isfile(path.join(d['path'], 'conf.py')) or \
|
||||
path.isfile(path.join(d['path'], 'source', 'conf.py')):
|
||||
print
|
||||
print bold('Error: an existing conf.py has been found in the '
|
||||
'selected root path.')
|
||||
print 'sphinx-quickstart will not overwrite existing Sphinx projects.'
|
||||
print
|
||||
do_prompt(d, 'path', 'Please enter a new root path (or just Enter to exit)',
|
||||
'', is_path)
|
||||
if not d['path']:
|
||||
sys.exit(1)
|
||||
|
||||
print '''
|
||||
You have two options for placing the build directory for Sphinx output.
|
||||
Either, you use a directory ".build" within the root path, or you separate
|
||||
|
Loading…
Reference in New Issue
Block a user