Browse files

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.
  • Loading branch information...
1 parent c28181e commit 33dadbfe07b8844b4428011c8f8ca24eb91633fe @apenwarr committed Feb 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 minimal/do
@@ -94,7 +94,7 @@ _run_dofile()
export REDO_TARGET=$PWD/$target
local line1
set -e
- read line1 <"$PWD/$dofile"
+ read line1 <"$PWD/$dofile" || true
if [ "$cmd" != "$line1" ]; then
/$cmd "$PWD/$dofile" "$@" >"$tmp.tmp2"

0 comments on commit 33dadbf

Please sign in to comment.