Hello,
a bug has been filed in the Debian BTS about dash not resetting the exit
status after sourcing an empty file with the dot command. [1]
The following test echoes "OK" with bash and "fail" with dash
#!/bin/sh
echo > ./empty
false
. ./empty && echo "OK" || echo "fail"
A similar bug in dash has been discussed and addressed in 2011 [2], but
it looks like the solution has been only partial.
The version of dash I tested is the current git master branch, commit
2e58422.
[1] https://bugs.debian.org/777262
[2] http://article.gmane.org/gmane.comp.shells.dash/531
Regards,
--
Gioele Barabucci <gioele@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html