Commit db3d4388 authored by jgruber's avatar jgruber Committed by Commit Bot

[release] Improve error message for merge_to_release.py

The new message lets us know which directory is involved and what we can
do to fix it.

Bug: 
Change-Id: Icfcb92b35b1ef2644649789b1e8473cb6ae50336
Reviewed-on: https://chromium-review.googlesource.com/571702Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46659}
parent 5162488a
......@@ -549,7 +549,8 @@ class Step(GitRecipesMixin):
def InitialEnvironmentChecks(self, cwd):
# Cancel if this is not a git checkout.
if not os.path.exists(os.path.join(cwd, ".git")): # pragma: no cover
self.Die("This is not a git checkout, this script won't work for you.")
self.Die("%s is not a git checkout. If you know what you're doing, try "
"deleting it and rerunning this script." % cwd)
# Cancel if EDITOR is unset or not executable.
if (self._options.requires_editor and (not os.environ.get("EDITOR") or
......
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