Explicitly read answers from /dev/tty
This is necessary if **yadm** is started by piping it into `bash`.
This commit is contained in:
parent
7f6fe24280
commit
a612a98136
1 changed files with 2 additions and 2 deletions
4
yadm
4
yadm
|
@ -395,7 +395,7 @@ function encrypt() {
|
||||||
if [[ $archive_status =~ $archive_regex ]] ; then
|
if [[ $archive_status =~ $archive_regex ]] ; then
|
||||||
echo "It appears that $YADM_ARCHIVE is not tracked by yadm's repository."
|
echo "It appears that $YADM_ARCHIVE is not tracked by yadm's repository."
|
||||||
echo "Would you like to add it now? (y/n)"
|
echo "Would you like to add it now? (y/n)"
|
||||||
read -r answer
|
read -r answer < /dev/tty
|
||||||
if [[ $answer =~ ^[yY]$ ]] ; then
|
if [[ $answer =~ ^[yY]$ ]] ; then
|
||||||
"$GIT_PROGRAM" add "$(mixed_path "$YADM_ARCHIVE")"
|
"$GIT_PROGRAM" add "$(mixed_path "$YADM_ARCHIVE")"
|
||||||
fi
|
fi
|
||||||
|
@ -707,7 +707,7 @@ function auto_bootstrap() {
|
||||||
echo "Found $YADM_BOOTSTRAP"
|
echo "Found $YADM_BOOTSTRAP"
|
||||||
echo "It appears that a bootstrap program exists."
|
echo "It appears that a bootstrap program exists."
|
||||||
echo "Would you like to execute it now? (y/n)"
|
echo "Would you like to execute it now? (y/n)"
|
||||||
read -r answer
|
read -r answer < /dev/tty
|
||||||
if [[ $answer =~ ^[yY]$ ]] ; then
|
if [[ $answer =~ ^[yY]$ ]] ; then
|
||||||
bootstrap
|
bootstrap
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue