Test: Cover contract runner consent
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ header(){ printf '\n%s%s%s\n' "${MAGENTA}${BOLD}" "$*" "$RESET"; }
|
||||
# Ask a yes/no question. Returns 0 for yes, 1 for no. Default = no.
|
||||
confirm() {
|
||||
local prompt="$1" reply
|
||||
printf '%s?%s %s %s[y/N]%s ' "${CYAN}${BOLD}" "$RESET" "$prompt" "$BOLD" "$RESET"
|
||||
printf '%s?%s %s %s[y/N]%s ' "${CYAN}${BOLD}" "$RESET" "$prompt" "$BOLD" "$RESET" >&2
|
||||
read -r reply || true
|
||||
[[ "$reply" =~ ^[Yy]([Ee][Ss])?$ ]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user