Skip to content

Commit 12d49fe

Browse files
committed
Fix unbounded variable when testing if no_colour is set (embarrassing!)
1 parent c8471e1 commit 12d49fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function main() {
6363

6464
script_init
6565
parse_params "$@"
66-
if [[ -z $no_colour ]]; then
66+
if [[ -z ${no_colour-} ]]; then
6767
colour_init
6868
fi
6969
}

template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ function main() {
298298

299299
script_init
300300
parse_params "$@"
301-
if [[ -z $no_colour ]]; then
301+
if [[ -z ${no_colour-} ]]; then
302302
colour_init
303303
fi
304304
}

0 commit comments

Comments
 (0)