selector: case2-precheck and case2-install refuse when selector.sh cannot be read

Neither script runs under set -e, so a failed source left selector_take
undefined and parsing carried on without the duplicate and conflict rules.
This commit is contained in:
jason.woltje committed 2026-11-08 21:56:02 -06:00
1 parent 4b7ddbcb43
commit dbb6909dcd
4 files changed
+22 -2

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ STACK_COPY="${CASE2_STACK_COPY:-$REPO/scripts/stack-copy.sh}"
usage() { echo 'usage: case2-install.sh --business ID --business-file FILE --commit SHA [--profile factory|library] [--personas DIR] [--home DIR]' >&2; exit 4; }
# shellcheck source=scripts/selector.sh
. "$REPO/scripts/selector.sh"
. "$REPO/scripts/selector.sh" || { echo "case2-install: cannot read $REPO/scripts/selector.sh" >&2; exit 4; }
# The selectors (rename design r2): the id family and the file family are separate scopes. A
# missing value is a usage error; a flag-shaped or invalid id is the business-id refusal below; a
# flag-shaped file, a repeated spelling and a conflict say why. All exit 4, as before.
+1 -1
View File
@@ -56,7 +56,7 @@ MARKER_TOKEN_CEILING=2000
usage() { echo 'usage: case2-precheck.sh --business ID [--profile factory|library] | --business ID --library-status' >&2; exit 4; }
# shellcheck source=scripts/selector.sh
. "$REPO/scripts/selector.sh"
. "$REPO/scripts/selector.sh" || { echo "case2-precheck: cannot read $REPO/scripts/selector.sh" >&2; exit 4; }
# --org and --business are one selector here (rename design r2). A missing value is a usage error,
# a flag-shaped or invalid one the business-id refusal below, and a repeated or conflicting one
# says why; all exit 4, as before.