Unbound variables can't be checked with -z anymore

Bug #1297898 reported by Removed by request
6
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I'm using Ubuntu 14.04 dev with bash 4.3-4ubuntu1 and if bash is started with the -u parameter any check of unbound variables will raise an unbound exception. Here is a testcase:

#!/bin/bash -u

if [ -z $SOME_UNINITIALIZED_VARIABLE ]
then
 echo Variable uninitialized
fi

Executing this script will result in this output: "./test.sh: line 3: SOME_UNINITIALIZED_VARIABLE: unbound variable"

Tags: trusty
Revision history for this message
Ken Sharp (kennybobs) wrote :

Is this still an issue in a current release?

tags: added: trusty
Changed in bash (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for bash (Ubuntu) because there has been no activity for 60 days.]

Changed in bash (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.