Fix SC2155 (directly export computed variables)

This commit is contained in:
Jonas Weber 2018-10-04 22:01:25 +02:00
parent a0db375f91
commit bcd7fbbcc4

View file

@ -19,9 +19,9 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
export key="$(cat "$__object/parameter/key" 2>/dev/null \
key="$(cat "$__object/parameter/key" 2>/dev/null \
|| echo "$__object_id")"
export state="$(cat "$__object/parameter/state")"
state="$(cat "$__object/parameter/state")"
file="$(cat "$__object/parameter/file")"
@ -30,14 +30,15 @@ if [ ! -f "$file" ]; then
exit
fi
export delimiter="$(cat "$__object/parameter/delimiter")"
export value="$(cat "$__object/parameter/value" 2>/dev/null \
delimiter="$(cat "$__object/parameter/delimiter")"
value="$(cat "$__object/parameter/value" 2>/dev/null \
|| echo "__CDIST_NOTSET__")"
if [ -f "$__object/parameter/exact_delimiter" ]; then
export exact_delimiter=1
exact_delimiter=1
else
export exact_delimiter=0
exact_delimiter=0
fi
export key state delimiter value exact_delimiter
awk -f - "$file" <<"AWK_EOF"
BEGIN {