<div class="gmail_quote"><div dir="ltr">On Wed, 16 Nov 2016, 10:36 p.m. Ian Jackson, <<a href="mailto:ijackson@chiark.greenend.org.uk">ijackson@chiark.greenend.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Package: pbuilder<br class="gmail_msg">
Version: 0.226.1<br class="gmail_msg">
<br class="gmail_msg">
zealot:~> pbuilder dumpconfig --configfile /dev/null<br class="gmail_msg">
E: Config file /dev/null does not exist<br class="gmail_msg">
zealot:~><br class="gmail_msg">
<br class="gmail_msg">
If it just tried to source it, rather than (presumably) pre-checking<br class="gmail_msg">
it with "test", it would say something like this:<br class="gmail_msg"></blockquote></div><div><br></div><div><br></div><div>It does a regular</div><div>    if [ -f "$RCFILE" ]; then</div><div>        . "$RCFILE"</div><div>    else</div><div>        echo "W: $RCFILE does not exist" >&2</div><div>    fi</div><div><br></div><div>Which fails for non-regular files like /dev/null is.</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
zealot:~> bash -c '. /dev/enoent'<br class="gmail_msg">
bash: /dev/enoent: No such file or directory<br class="gmail_msg">
zealot:~><br class="gmail_msg">
<br class="gmail_msg">
I think that would probably be preferable...<br class="gmail_msg"></blockquote></div><div><br></div><div>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?</div><div><br></div><div>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.</div>