mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
feat: auto-stash changes in bench (tool) on update
This commit is contained in:
parent
c93a25d336
commit
186c0eafda
@ -275,7 +275,11 @@ def update_bench(bench_repo=True, requirements=True):
|
||||
cwd = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
if bench_repo:
|
||||
try:
|
||||
exec_cmd("git pull", cwd=cwd)
|
||||
except bench.utils.CommandFailedError:
|
||||
exec_cmd("git stash", cwd=cwd)
|
||||
logger.info("Stashing changes made at {}\nUse git stash apply to recover changes after the successful update!".format(cwd))
|
||||
|
||||
if requirements:
|
||||
update_bench_requirements()
|
||||
|
Loading…
Reference in New Issue
Block a user