From cebbd9fb7b306f32b47146a2be0f67fecd7e61a1 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Mon, 23 Feb 2015 12:45:20 -0700 Subject: [PATCH] Quote array index with -n so -n works properly For some reason -n doesn't work with arrays, probably becuase the array has an entry by the array's indexed value is empty. By quoting it we get it as one unit, which behaves as expected. Change-Id: Ic3243d13d3f8fc9978c460f816e33ad348302d8e --- tools/build-all-docker-images | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build-all-docker-images b/tools/build-all-docker-images index 0f2ba03cb6..5f016f72c4 100755 --- a/tools/build-all-docker-images +++ b/tools/build-all-docker-images @@ -80,7 +80,7 @@ function init_image { function process_image { local image=$1 - if [ -n ${dependency[$image]} ]; then + if [ -n "${dependency[$image]}" ]; then process_image ${dependency[$image]} fi if requires_build $image; then