On Wed, 16 Nov 2016, 10:36 p.m. Ian Jackson, < ijack...@chiark.greenend.org.uk> wrote:
> Package: pbuilder > Version: 0.226.1 > > zealot:~> pbuilder dumpconfig --configfile /dev/null > E: Config file /dev/null does not exist > zealot:~> > > If it just tried to source it, rather than (presumably) pre-checking > it with "test", it would say something like this: > It does a regular if [ -f "$RCFILE" ]; then . "$RCFILE" else echo "W: $RCFILE does not exist" >&2 fi Which fails for non-regular files like /dev/null is. zealot:~> bash -c '. /dev/enoent' > bash: /dev/enoent: No such file or directory > zealot:~> > > I think that would probably be preferable... > Do you mean that probably the message should takr into account that a reason for failure of that test could be something different than enonet? If that the problem it could prably be solved imho in a nicer way by nesting another if in the else branch to check for simple existence (by [ -e $file ]) and print a proper message if the file exists but it's not regular, and keep the current message only for the real enoent case.