From 3da554bde80b6229f22a8ef84dedebc9ba338ae5 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 21 May 2013 17:30:14 +0200 Subject: [PATCH] supybot-wizard: Display a warning if conf is in the source folder. Closes GH-402. --- scripts/supybot-wizard | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/supybot-wizard b/scripts/supybot-wizard index 2150e439d..62bbabb51 100644 --- a/scripts/supybot-wizard +++ b/scripts/supybot-wizard @@ -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: