cleanup: use double brackets instead of single
[[ ... ]] reduces errors as no pathname expansion or word splitting
takes place between [[ and ]]. In addition, [[ ... ]] allows for
regular expression matching while [ ... ] does not.
Change-Id: I3f085152d9ba21a72eff5d5dc301cc5b80226a70
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index 4cb549b..3f1870d 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -36,7 +36,7 @@
DEPCACHE_FILE=""
cleanup() {
local status="$?"
- if [ -n "$DEPCACHE_FILE" ]; then
+ if [[ -n "$DEPCACHE_FILE" ]]; then
rm -f "$DEPCACHE_FILE"
fi
trap - EXIT ERR