If FUNCNAME[0] is undefined and 'set -u' has been used it will cause the
devstack run to fail.
Handle undefined values in PS4.
Closes-Bug: #1543749
Change-Id: I06a013a5e7683e3a3461ff06361d867f61d48e6a
| ... | ... |
@@ -15,7 +15,7 @@ LC_ALL=C |
| 15 | 15 |
export LC_ALL |
| 16 | 16 |
|
| 17 | 17 |
# Make tracing more educational |
| 18 |
-export PS4='+ ${BASH_SOURCE}:${FUNCNAME[0]}:L${LINENO}: '
|
|
| 18 |
+export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
|
|
| 19 | 19 |
|
| 20 | 20 |
# Find the other rc files |
| 21 | 21 |
RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
|