supybot-wizard: Display a warning if conf is in the source folder. Closes GH-402.

This commit is contained in:
Valentin Lorentz 2013-05-21 17:30:14 +02:00
parent d0f50fb388
commit 3da554bde8

View File

@ -180,6 +180,17 @@ def main():
if os.name == 'posix':
if (os.getcwd() == os.path.expanduser('~')) and not options.allowHome:
error('Please, don\'t run this in your HOME directory.')
if os.path.isfile(os.path.join('scripts', 'supybot-wizard')) or \
os.path.isfile(os.path.join('..', 'scripts', 'supybot-wizard')):
print('')
print('+------------------------------------------------------------+')
print('| +--------------------------------------------------------+ |')
print('| | Warning: It looks like you are running the wizard from | |')
print('| | the Supybot source directory. This is not recommended. | |')
print('| | Please press Ctrl-C and change to another directory. | |')
print('| +--------------------------------------------------------+ |')
print('+------------------------------------------------------------+')
print('')
filename = ''
if args: