Skip to content
Snippets Groups Projects
Commit dd84a906 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé
Browse files

scripts: check if .git exists before checking submodule status


Currently we check status of each submodule, before actually checking
if we're in a git repo. These status commands will all fail, but we
are hiding their output so we don't see it currently.

Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
parent 73422d95
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,12 @@ validate_error() {
exit 1
}
if test -n "$maybe_modules" && ! test -e ".git"
then
echo "$0: unexpectedly called with submodules but no git checkout exists"
exit 1
fi
modules=""
for m in $maybe_modules
do
......@@ -63,12 +69,6 @@ do
fi
done
if test -n "$maybe_modules" && ! test -e ".git"
then
echo "$0: unexpectedly called with submodules but no git checkout exists"
exit 1
fi
case "$command" in
status|validate)
if test -z "$maybe_modules"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment