2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-24 04:59:01 +00:00

Merge pull request #953 from gavindsouza/bench-init-error

chore: print error message in case of failures
This commit is contained in:
gavin 2020-03-11 13:45:06 +05:30 committed by GitHub
commit 0e5f36dbf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,10 +38,11 @@ def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups, c
log('Bench {} initialized'.format(path), level=1)
except SystemExit:
pass
except:
except Exception as e:
import os, shutil, time, six
# add a sleep here so that the traceback of other processes doesnt overlap with the prompts
time.sleep(1)
print(e)
log("There was a problem while creating {}".format(path), level=2)
if six.moves.input("Do you want to rollback these changes? [Y/n]: ").lower() == "y":
print('Rolling back Bench "{}"'.format(path))