mirror of
https://github.com/ivuorinen/actions.git
synced 2026-03-05 00:54:50 +00:00
fix: ask_confirmation tty redirection (#330)
This commit is contained in:
@@ -153,7 +153,7 @@ prompt_confirmation() {
|
|||||||
|
|
||||||
# Use timeout command to limit read duration
|
# Use timeout command to limit read duration
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
if response=$(timeout "$timeout_seconds" sh -c 'read -r r && echo "$r"' 2>/dev/null); then
|
if response=$(timeout "$timeout_seconds" sh -c 'read -r r </dev/tty && echo "$r"' 2>/dev/null); then
|
||||||
: # read succeeded within timeout
|
: # read succeeded within timeout
|
||||||
else
|
else
|
||||||
printf '\n'
|
printf '\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user