fix: publish_version.sh beendet sich mit Status 0
Das EXIT-Trap rief cleanup auf, dessen letzte Anweisung `[[ -n "$file" ]]` bei leerer Liste fehlschlug. Unter `set -e` wurde daraus Exit 1, obwohl --check und der Upload erfolgreich waren.
This commit is contained in:
parent
d6c0b52807
commit
54b72c2875
1 changed files with 4 additions and 1 deletions
|
|
@ -37,8 +37,11 @@ TMP_FILES=()
|
||||||
cleanup() {
|
cleanup() {
|
||||||
local file
|
local file
|
||||||
for file in "${TMP_FILES[@]:-}"; do
|
for file in "${TMP_FILES[@]:-}"; do
|
||||||
[[ -n "$file" ]] && rm -f "$file"
|
if [[ -n "$file" ]]; then
|
||||||
|
rm -f "$file"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue