From 92884ede5d20a399186c61cf5e003da61838eec4 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 22 Jul 2015 12:16:45 +1000 Subject: [PATCH] ini-config : always reenable xtrace on return These return paths doesn't renable xtrace, so output mysteriously goes missing until the next time it is enabled. Change-Id: I3a8018dfa9397c07534970c39fba8dc10afcbe41 --- inc/ini-config | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/inc/ini-config b/inc/ini-config index 26401f3917..8e7c0187ae 100644 --- a/inc/ini-config +++ b/inc/ini-config @@ -104,7 +104,10 @@ function iniadd_literal { local option=$3 local value=$4 - [[ -z $section || -z $option ]] && return + if [[ -z $section || -z $option ]]; then + $xtrace + return + fi # Add it sed -i -e "/^\[$section\]/ a\\ @@ -123,7 +126,10 @@ function inidelete { local section=$2 local option=$3 - [[ -z $section || -z $option ]] && return + if [[ -z $section || -z $option ]]; then + $xtrace + return + fi # Remove old values sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file" @@ -141,7 +147,10 @@ function iniset { local option=$3 local value=$4 - [[ -z $section || -z $option ]] && return + if [[ -z $section || -z $option ]]; then + $xtrace + return + fi if ! grep -q "^\[$section\]" "$file" 2>/dev/null; then # Add section at the end