mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
fix: handle missing installer channel value (#2015)
This commit is contained in:
@@ -71,6 +71,11 @@ while [[ $# -gt 0 ]]; do
|
||||
exit 0
|
||||
;;
|
||||
--channel)
|
||||
if [[ $# -lt 2 || "${2:-}" == -* ]]; then
|
||||
log_err "Missing value for --channel"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
CHANNEL="${2:-}"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
@@ -30,6 +30,20 @@ if [[ "$missing_platform_rc" -ne 3 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set +e
|
||||
missing_channel_output=$(bash "$REPO_ROOT/scripts/install.sh" --channel 2>&1)
|
||||
missing_channel_rc=$?
|
||||
set -e
|
||||
if [[ "$missing_channel_rc" -eq 0 ]]; then
|
||||
echo "FAIL: install.sh --channel should fail when the value is missing"
|
||||
exit 1
|
||||
fi
|
||||
if [[ "$missing_channel_output" != *"Missing value for --channel"* ]]; then
|
||||
echo "FAIL: install.sh --channel should explain that the value is missing"
|
||||
echo "$missing_channel_output"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
assert_retry_shape() {
|
||||
local calls="$1" label="$2"
|
||||
local _ first second extra
|
||||
|
||||
Reference in New Issue
Block a user