Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Commit ffcd4b2

Browse files
committed
Fix Pkg to Only Add Weasel if Already Exists (#6977)
* Only add weasel if exists * Simplify
1 parent 5f921e9 commit ffcd4b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ while getopts h78abdf:lopqvsSL opt; do
155155
esac
156156
done
157157

158+
CMD=$("${COMPOSECMD[@]}" -f $COMPOSE_FILE config --services)
158159
# Weasel must be built first otherwise it will fail from build artifacts/cache in an environment that doesn't have git
159160
# e.g. the environment produced by `./pkg source`.
160-
PROJECTS="weasel"$'\n'"$("${COMPOSECMD[@]}" -f $COMPOSE_FILE config --services | sed '/^weasel$/d')"
161+
PROJECTS=$(grep -E "^weasel$" <<<"$CMD"; grep -Ev "^weasel$"<<<"$CMD")
161162
HELP_TEXT="$(cat <<HELP_TEXT
162163
Usage: $SELF [options] [projects]
163164
-7 Build RPMs targeting CentOS 7

0 commit comments

Comments
 (0)