From 479ce841bc34bcb5640ffc4609dc7f01423ca2d3 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Wed, 10 Feb 2016 07:54:14 -0800 Subject: [PATCH] fail build scripts if `git submodule update` fails Summary: public When this happen, we don't want to waste time compiling infer for java, etc., only to realise later that the submodule is not there. Reviewed By: akotulski Differential Revision: D2921636 fb-gh-sync-id: b22c44c shipit-source-id: b22c44c --- autogen.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/autogen.sh b/autogen.sh index 24e7c64d0..80d7a305f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -14,11 +14,8 @@ set -e # repo in the first place?) if test -d '.git'; then printf 'git repository detected, updating submodule... ' - if git submodule update --init > /dev/null; then - printf 'done\n' - else - printf 'error running git command\n' - fi + git submodule update --init > /dev/null + printf 'done\n' else echo 'no git repository detected; not updating git submodules' fi