mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 00:06:36 +00:00
Merge pull request #953 from gavindsouza/bench-init-error
chore: print error message in case of failures
This commit is contained in:
commit
0e5f36dbf7
@ -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)
|
log('Bench {} initialized'.format(path), level=1)
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
pass
|
pass
|
||||||
except:
|
except Exception as e:
|
||||||
import os, shutil, time, six
|
import os, shutil, time, six
|
||||||
# add a sleep here so that the traceback of other processes doesnt overlap with the prompts
|
# add a sleep here so that the traceback of other processes doesnt overlap with the prompts
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
print(e)
|
||||||
log("There was a problem while creating {}".format(path), level=2)
|
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":
|
if six.moves.input("Do you want to rollback these changes? [Y/n]: ").lower() == "y":
|
||||||
print('Rolling back Bench "{}"'.format(path))
|
print('Rolling back Bench "{}"'.format(path))
|
||||||
|
Loading…
Reference in New Issue
Block a user