More helpful user-actionable failure.

This commit is contained in:
Anthony Plunkett 2016-02-09 17:47:11 -04:00
parent 6db7d177ae
commit 0a6ac772ee
1 changed files with 5 additions and 2 deletions

View File

@ -97,19 +97,22 @@ def main():
install_dir, lib_dir = find_location()
if install_dir == None:
print 'Lektor seems to be already installed'
print ' Lektor seems to be already installed at:'
print ' {}'.format(get_location())
while 1:
input = raw_input(
'Delete existing and reinstall? [Yn]'
).lower().strip()
if input in ('', 'y'):
shutil.rmtree(get_location())
shutil.rmtree(get_location(), onerror=deletion_error)
break
elif input == 'n':
print 'Aborted!'
sys.exit()
install_dir, lib_dir = find_location()
print ' Installing at: %s' % install_dir
while 1:
input = raw_input('Continue? [Yn] ').lower().strip()