Set buffering type to unbuffered for pacman pipes

This commit is contained in:
Santiago Lo Coco 2022-01-02 21:58:06 -03:00
parent 6eae17537e
commit bcbbc25636
1 changed files with 3 additions and 3 deletions

View File

@ -148,7 +148,7 @@ mountPart() {
debug() { debug() {
while read -r input; do while read -r input; do
if [ $debugFlag = true ]; then if [ $debugFlag = true ]; then
echo "$input" tee
elif [ $debugFlagToFile = true ]; then elif [ $debugFlagToFile = true ]; then
echo "$input" >> CocoASAIS.debug echo "$input" >> CocoASAIS.debug
else else
@ -166,12 +166,12 @@ installPackage() {
B) B)
runInChroot "pacman -Q ${1}" 2>&1 | debug runInChroot "pacman -Q ${1}" 2>&1 | debug
[ $? -eq 0 ] && return [ $? -eq 0 ] && return
runInChroot "pacman -S --needed --noconfirm ${1}" 2>&1 | debug runInChroot "script -qec \"pacman -S --needed --noconfirm ${1}\" /dev/null" 2>&1 | debug
;; ;;
C) C)
runInChroot "sudo -u $username paru -Q ${1}" 2>&1 | debug runInChroot "sudo -u $username paru -Q ${1}" 2>&1 | debug
[ $? -eq 0 ] && return [ $? -eq 0 ] && return
runInChroot "sudo -u $username paru -S --needed --noconfirm --skipreview ${1}" 2>&1 | debug runInChroot "script -qec \"sudo -u $username paru -S --needed --noconfirm --skipreview ${1}\" /dev/null" 2>&1 | debug
;; ;;
?) ?)
logAndExit "INSTALL must be A, B or C in packages.csv file." "${3}" logAndExit "INSTALL must be A, B or C in packages.csv file." "${3}"