Skip to content

Commit 31437ea

Browse files
committed
Fix to "missing last line" bug
1 parent 563df6d commit 31437ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripts/utils.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,9 @@ function installRequiredPythonPackages () {
20122012
currentOption=''
20132013

20142014
IFS=$'\n' # set the Internal Field Separator as end of line
2015-
cat "${requirementsPath}" | while read -r line
2015+
2016+
# "|| [ -n "$line" ]" is for last line: https://stackoverflow.com/a/12919766
2017+
cat "${requirementsPath}" | while read -r line || [ -n "$line" ]
20162018
do
20172019

20182020
line="$(echo $line | tr -d '\r\n')" # trim newlines / CRs

0 commit comments

Comments
 (0)