Avoid running build_allowed if there is no git repo
Avoid running build_allowed if there is no git repo

This script requires a git repo so check for that before calling it.

Also make sure to exit with failure when something goes wrong, since we
want the CQ to notice.

BUG=b:195718112
BRANCH=none
TEST=FW_NAME=volteer2 emerge-volteer chromeos-ec
(with cros_workon)
Check that it runs the second script only if there is a git repo (i.e.
with cros_workon).

Signed-off-by: Simon Glass <c00b0378376498bd9cd974c388df8854c0131d27@chromium.org>
Change-Id: Ib88b9a30f6ab7f41b425470d994f7f8747b77cbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3415372
Reviewed-by: Jack Rosenthal <d3f605bef1867f59845d4ce6e4f83b8dc9e4e0ae@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec