minimal/do: some shells return error in "read x <file" for empty files.
...or files that contain bytes but not a trailing newline. It's okay if we don't get any data, but we definitely have to *not* let "set -e" abort us. Now that we fixed set -e in the previous patch, it revealed this problem.
This commit is contained in:
parent
c28181e26f
commit
33dadbfe07
1 changed files with 1 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ _run_dofile()
|
||||||
export REDO_TARGET=$PWD/$target
|
export REDO_TARGET=$PWD/$target
|
||||||
local line1
|
local line1
|
||||||
set -e
|
set -e
|
||||||
read line1 <"$PWD/$dofile"
|
read line1 <"$PWD/$dofile" || true
|
||||||
cmd=${line1#"#!/"}
|
cmd=${line1#"#!/"}
|
||||||
if [ "$cmd" != "$line1" ]; then
|
if [ "$cmd" != "$line1" ]; then
|
||||||
/$cmd "$PWD/$dofile" "$@" >"$tmp.tmp2"
|
/$cmd "$PWD/$dofile" "$@" >"$tmp.tmp2"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue