[Nix-dev] Re: eval $buildPhase and exit code in case of syntax error
    Ludovic Courtès 
    ludo at gnu.org
       
    Thu Nov 20 09:42:14 CET 2008
    
    
  
Hi,
Marc Weber <marco-oweber at gmx.de> writes:
>>   `eval'
>>             eval [ARGUMENTS]
>>        The arguments are concatenated together into a single command,
>>        which is then read and executed, and its exit status returned as
>>        the exit status of `eval'.  If there are no arguments or only
>>        empty arguments, the return status is zero.
>> 
>> Doesn't it work as documented for you?
>
> Sorry, bad example, try this:
>
>   eval "foo while; { foo }"; echo $?
Ah, right, syntax errors don't seem to yield a non-zero exit status,
which sucks.  Still, does it warrant the complexity of what you propose?
And anyway, there's a famous saying among schemers that I find apropos
here as well: "`eval' is evil".  :-)
Thanks,
Ludo'.
    
    
More information about the nix-dev
mailing list