Skip to content

Commit a959ea2

Browse files
committed
phase-helpers.sh: Move assert() from isolated-functions to here
assert() is no longer used internally. Signed-off-by: Ulrich Müller <[email protected]>
1 parent 21b9458 commit a959ea2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

bin/isolated-functions.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ fi
2222
# It _must_ preceed all the calls to die and assert.
2323
shopt -s expand_aliases
2424

25-
assert() {
26-
local x pipestatus=( "${PIPESTATUS[@]}" )
27-
___eapi_has_assert || die "'${FUNCNAME}' banned in EAPI ${EAPI}"
28-
for x in "${pipestatus[@]}"; do
29-
[[ ${x} -eq 0 ]] || die "$@"
30-
done
31-
}
32-
3325
# Simplified version of pipestatus() for internal use
3426
__pipestatus() {
3527
local status=( "${PIPESTATUS[@]}" ) s ret=0

bin/phase-helpers.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ if ! contains_word strip "${PORTAGE_RESTRICT}"; then
2828
PORTAGE_DOSTRIP+=( / )
2929
fi
3030

31+
assert() {
32+
local x pipestatus=( "${PIPESTATUS[@]}" )
33+
___eapi_has_assert || die "'${FUNCNAME}' banned in EAPI ${EAPI}"
34+
for x in "${pipestatus[@]}"; do
35+
[[ ${x} -eq 0 ]] || die "$@"
36+
done
37+
}
38+
3139
into() {
3240
if [[ "$1" == "/" ]]; then
3341
export __E_DESTTREE=""

0 commit comments

Comments
 (0)