Skip to content

Commit ce535b5

Browse files
committed
Suppress some erroneous shellcheck warnings
1 parent 668ee7c commit ce535b5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

source.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ function script_init() {
122122
readonly script_params="$*"
123123

124124
# Important to always set as we use it in the exit handler
125+
# shellcheck disable=SC2155
125126
readonly ta_none="$(tput sgr0 2> /dev/null || true)"
126127
}
127128

@@ -131,7 +132,7 @@ function script_init() {
131132
# NOTE: If --no-colour was set the variables will be empty. The output of the
132133
# $ta_none variable after each tput is redundant during normal execution,
133134
# but ensures the terminal output isn't mangled when running with xtrace.
134-
# shellcheck disable=SC2034
135+
# shellcheck disable=SC2034,SC2155
135136
function colour_init() {
136137
if [[ -z ${no_colour-} ]]; then
137138
# Text attributes

template.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ function script_init() {
136136
readonly script_params="$*"
137137

138138
# Important to always set as we use it in the exit handler
139+
# shellcheck disable=SC2155
139140
readonly ta_none="$(tput sgr0 2> /dev/null || true)"
140141
}
141142

@@ -145,7 +146,7 @@ function script_init() {
145146
# NOTE: If --no-colour was set the variables will be empty. The output of the
146147
# $ta_none variable after each tput is redundant during normal execution,
147148
# but ensures the terminal output isn't mangled when running with xtrace.
148-
# shellcheck disable=SC2034
149+
# shellcheck disable=SC2034,SC2155
149150
function colour_init() {
150151
if [[ -z ${no_colour-} ]]; then
151152
# Text attributes

0 commit comments

Comments
 (0)