commit:     40a95dd1aa272f1e9b5c27c53e847cdc8237f1c6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 18 19:45:05 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Nov 19 15:13:35 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40a95dd1

python-utils-r1.eclass: Add missing ||die on file read

 eclass/python-utils-r1.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 0a04e12..201b0c4 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1038,12 +1038,12 @@ python_fix_shebang() {
                        local shebang i
                        local error= from=
 
-                       IFS= read -r shebang <"${f}"
+                       IFS= read -r shebang <"${f}" || die
 
                        # First, check if it's shebang at all...
                        if [[ ${shebang} == '#!'* ]]; then
                                local split_shebang=()
-                               read -r -a split_shebang <<<${shebang}
+                               read -r -a split_shebang <<<${shebang} || die
 
                                # Match left-to-right in a loop, to avoid 
matching random
                                # repetitions like 'python2.7 python2'.

Reply via email to