Skip to content

Commit 4d95364

Browse files
Masterisk-Fpbrisbin
authored andcommitted
fix: make build_failed true if git checkout fails
Corrections in response to suggestions
1 parent f1ae7ea commit 4d95364

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/downgrade

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,7 @@ build_pkg() {
577577
commit_hash=$(sed -r "s/$gitpkgreg/\3/" <<<"$item")
578578

579579
pushd "$path" >/dev/null
580-
su -P "$(stat -c"%U" PKGBUILD)" -c "git checkout $commit_hash &>/dev/null"
581-
su -P "$(stat -c"%U" PKGBUILD)" -c "makepkg -fs"
580+
su -P "$(stat -c"%U" PKGBUILD)" -c "git checkout $commit_hash &>/dev/null && makepkg -fs"
582581
build_failed=$?
583582

584583
if ((!build_failed)); then

0 commit comments

Comments
 (0)