Commit c87e36aa authored by Robert Iannucci's avatar Robert Iannucci Committed by Commit Bot

[git rebase-update] Handle error when chdir'ing to original workdir.

BUG=

Change-Id: I1dc7f20eea3f4b1be9179aa6d77bdee08ab8a04f
Reviewed-on: https://chromium-review.googlesource.com/431576Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
parent d0e1d9d9
......@@ -311,8 +311,16 @@ def main(args=None):
% (return_branch, root_branch)
)
git.run('checkout', root_branch)
# return_workdir may also not be there any more.
if return_workdir:
try:
os.chdir(return_workdir)
except OSError as e:
print (
"Unable to return to original workdir %r: %s"
% (return_workdir, e)
)
git.set_config(STARTING_BRANCH_KEY, '')
git.set_config(STARTING_WORKDIR_KEY, '')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment