tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Deferring variable parse errors in /bin/sh

On Mon, Jun 12, 2017 at 08:48:34AM +0700, Robert Elz wrote:
> The code in this case was in code that only executed on darwin, and there
> (I am guessing) /bin/sh == bash and this code would have worked, so if we
> had not issued the error during parsing (and the script has no other bashisms
> that would mess things up) then it is possible we could keep executing this
> with /bin/sh.
> What do you all think, should we defer the error (and so never issue it if
> the value is never referenced) or keep on enforcing posix sh syntax (or as
> much of it as we can stomach) ?

I don't like hiding errors like this (unless Posix requires it).

Pkgsrc has easy ways to use bash if needed, so this should be fixed in
pkgsrc, IMHO.


Home | Main Index | Thread Index | Old Index