Skip to content

Commit dd63299

Browse files
committed
Error expansion seems to be missed
Fixes: #393 Signed-off-by: Sergio Arroutbi <[email protected]>
1 parent 3999199 commit dd63299

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/luks/clevis-luks-report

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,13 @@ report_sss() {
9797
[ -z "${content}" ] && return 1
9898

9999
local jwe
100-
for jwe in $(jose fmt --json="${content}" --get jwe --foreach=-); do
100+
local jwe_list
101+
if ! jwe_list="$(jose fmt --json="${content}" --get jwe --foreach=-);"; then
102+
return 1
103+
fi
104+
for jwe in $jwe_list; do
101105
jwe="$(printf '%s' "${jwe}" | sed -e 's/"//g')"
102-
report_decode "${jwe}"
106+
report_decode "${jwe}" || return 1
103107
done
104108
}
105109

@@ -129,10 +133,10 @@ report_decode() {
129133

130134
case "${pin}" in
131135
tang)
132-
report_tang "${content}"
136+
report_tang "${content}" || return 1
133137
;;
134138
sss)
135-
report_sss "${content}"
139+
report_sss "${content}" || return 1
136140
;;
137141
esac
138142
}

0 commit comments

Comments
 (0)