Skip to content

Commit

Permalink
Fix Pkg to Only Add Weasel if Already Exists (#6977)
Browse files Browse the repository at this point in the history
* Only add weasel if exists

* Simplify
  • Loading branch information
shamrickus committed Jul 21, 2022
1 parent 5f921e9 commit ffcd4b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,10 @@ while getopts h78abdf:lopqvsSL opt; do
esac
done

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

0 comments on commit ffcd4b2

Please sign in to comment.