minimal/do: work around a bug with empty .do files.
If you ". ./filename" and ./filename contains no commands, apparently ash/dash will give the exit code of the command *before* the ., rather than defaulting to zero as it supposedly should. This should work around it in our .do files at least. Reported by Tim Allen.
This commit is contained in:
parent
2dde4dbced
commit
1ed168e79e
1 changed files with 1 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ _run_dofile()
|
|||
if [ "$cmd" != "$line1" ]; then
|
||||
/$cmd "$PWD/$DOFILE" "$@" >"$TARGET.tmp2"
|
||||
else
|
||||
. "$PWD/$DOFILE" >"$TARGET.tmp2"
|
||||
:; . "$PWD/$DOFILE" >"$TARGET.tmp2"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue