On Sun, Jan 13, 2013 at 03:31:24AM +0100, John Kearney wrote:
> set -o errexit
> test_func() {
>     [ ! -d test ] && echo test2
> }
> 
> echo test3
> test_func
> echo test4
> 
> now so long as test doesn't exist in the cwd it should errexit.
> at least it did for me just now.

Cannot reproduce.

imadev:~$ cat bar
#!/bin/bash

set -e
f() { test ! -d nosuchdir && echo no dir; }
f
echo survived
imadev:~$ ./bar
no dir
survived

Reply via email to