diff --git a/scripts/clean-build.sh b/scripts/clean-build.sh index 0c0f612..d7219d7 100755 --- a/scripts/clean-build.sh +++ b/scripts/clean-build.sh @@ -44,8 +44,10 @@ cleanup() { # In cases where anbox comes directly from a checked out Android # build environment we miss some symlinks which are present on # the host and don't have a valid git repository in that case. - git clean -fdx . || true - git reset --hard || true + if [ -d .git ] ; then + git clean -fdx . + git reset --hard + fi } cleanup