Skip to content

Commit e3f6fb8

Browse files
committed
fixup! No longer require hooks/extensions must be added to overlays
1 parent 931915d commit e3f6fb8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

priv/templates/extended_bin

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Commands:
189189
versions Print versions of the release available
190190
escript Run an escript in the same environment as the release
191191
status Verify node is running and then run status hook scripts
192-
$EXTENSION_DESCRIPTIONS"
192+
$(relx_extension_descriptions)"
193193
fi
194194
;;
195195
esac
@@ -548,6 +548,20 @@ relx_run_extension() {
548548
[ -f "$RELEASE_ROOT_DIR/$EXTENSION_SCRIPT" ] && . "$RELEASE_ROOT_DIR/$EXTENSION_SCRIPT" "$@"
549549
}
550550

551+
relx_extension_descriptions() {
552+
IFS0=$IFS
553+
IFS='|'
554+
for description in $EXTENSION_DESCRIPTIONS
555+
do
556+
cmd=$(echo "$description" |cut -d '=' -f1)
557+
descr=$(echo "$description" |cut -d '=' -f2)
558+
# 23 is the magic number of spaces that take up
559+
# the space between a command and it's description
560+
printf ' %-23s %s\n' "$cmd" "$descr"
561+
done
562+
IFS=$IFS0
563+
}
564+
551565
# given a list of arguments, identify the internal ones
552566
# --relx-disable-hooks
553567
# and process them accordingly

0 commit comments

Comments
 (0)