Skip to content

Commit b123cf5

Browse files
authored
Merge pull request #379 from Martchus/error-handling
Ensure staging project is still cleared on errors in auto submit script
2 parents 85fed3f + 4be2251 commit b123cf5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

os-autoinst-obs-auto-submit

+3-1
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,12 @@ trap 'rm -rf "$TMPDIR"' EXIT
198198

199199
(
200200
cd "$TMPDIR"
201+
rc=0
201202
auto_submit_packages=${packages:-$($osc ls "$dst_project" | grep -v '\-test$')}
202203
for package in $auto_submit_packages; do
203-
handle_auto_submit "$package"
204+
handle_auto_submit "$package" || rc=$?
204205
# delete package from staging project
205206
[[ $from_staging ]] && $osc rdelete -m "Cleaning up $package from $staging_project for next submission" "$staging_project" "$package"
206207
done
208+
exit "$rc"
207209
)

0 commit comments

Comments
 (0)