Commit df6d1cc3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add broken workaround against yes command using before pipe

parent 2e60d407
...@@ -390,6 +390,10 @@ done ...@@ -390,6 +390,10 @@ done
# if input is not console and run script from file, get pkgs from stdin too # if input is not console and run script from file, get pkgs from stdin too
if ! inputisatty && [ -n "$PROGDIR" ] ; then if ! inputisatty && [ -n "$PROGDIR" ] ; then
for opt in $(withtimeout 1 cat) ; do for opt in $(withtimeout 1 cat) ; do
# FIXME: do not work
# workaround against # yes | epme
[ "$opt" = "y" ] && break;
[ "$opt" = "yes" ] && break;
check_filenames $opt check_filenames $opt
done done
fi fi
......
...@@ -297,12 +297,12 @@ withtimeout() ...@@ -297,12 +297,12 @@ withtimeout()
{ {
local TO=$(which timeout 2>/dev/null || which gtimeout 2>/dev/null) local TO=$(which timeout 2>/dev/null || which gtimeout 2>/dev/null)
if [ -x "$TO" ] ; then if [ -x "$TO" ] ; then
$TO $@ $TO "$@"
return return
fi fi
# fallback: drop time arg and run without timeout # fallback: drop time arg and run without timeout
shift shift
$@ "$@"
} }
set_eatmydata() set_eatmydata()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment