bug-bash
[Top][All Lists]
Advanced

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

Re: typeset -p on an empty integer variable is an error. (plus -v test w


From: Greg Wooledge
Subject: Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements)
Date: Mon, 14 Jan 2013 08:33:17 -0500
User-agent: Mutt/1.4.2.3i

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

[Prev in Thread] Current Thread [Next in Thread]