File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed
Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -162,25 +162,6 @@ prepare() {
162162 fi
163163}
164164
165- gum_no_tty () {
166- cmd=" $1 "
167- while test " $1 " ! = -- -a -n " $1 " ; do
168- shift
169- done
170- if test -n " $1 " ; then shift ; fi # remove the --
171- case " $cmd " in
172- format|style)
173- echo " $@ " ;;
174- confirm)
175- if test -n " $TEA_YES " ; then
176- echo " tea: error: no tty detected, re-run with \` YES=1\` set" >&2
177- return 1
178- fi ;;
179- * )
180- " $@ " ;;
181- esac
182- }
183-
184165get_gum () {
185166 if command -v gum > /dev/null 2>&1 ; then
186167 TEA_GUM=gum
@@ -218,6 +199,9 @@ gum_func() {
218199 $TEA_GUM " $@ " --timeout=1ms --default=yes
219200 set -e
220201 return 0
202+ elif test ! -t 1; then
203+ echo " tea: error: no tty detected, re-run with \` TEA_YES=1\` set" >&2
204+ return 1
221205 fi ;;
222206 spin)
223207 if test ! -t 1; then
You can’t perform that action at this time.
0 commit comments