From 48ea25d78976d259070f89dfa2b9a3293c337b6c Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Tue, 7 Apr 2015 11:08:31 +0100 Subject: add locals to validate_non_empty --- swift-storage.configure | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/swift-storage.configure b/swift-storage.configure index 315a1d31..563b0ed0 100644 --- a/swift-storage.configure +++ b/swift-storage.configure @@ -32,9 +32,12 @@ validate_number() { } validate_non_empty() { - if [[ $2 = None ]] + local name="$1" + local value="$2" + + if [[ $value = None ]] then - echo "'$1' cannot be empty" >&2 + echo "'$name' cannot be empty" >&2 exit 1 fi } -- cgit v1.2.1