Silence SC2295

Otherwise https://www.shellcheck.net/ would complain:
  Line 86:
  term_just_first_character="${TERM%$term_without_first_character}"
                                    ^-- SC2295 (info): Expansions inside
                                      ${..} need to be quoted
                                      separately, otherwise they match
                                      as patterns.

See: https://www.shellcheck.net/wiki/SC2295

CentOS Stream 9 has ShellCheck-0.8.0, while so far the 'unit tests' were
being run on Fedora 36, which only has ShellCheck-0.7.2.

This is a step towards testing on CentOS Stream 9.

https://github.com/containers/toolbox/pull/1200
This commit is contained in:
Debarshi Ray 2022-12-14 15:45:03 +01:00
parent 995c6d175e
commit de1c17804d
2 changed files with 3 additions and 3 deletions

View file

@ -83,7 +83,7 @@ if [ -f /run/.containerenv ] \
if [ "$TERM" != "" ]; then
error_message="Error: terminfo entry not found for $TERM"
term_without_first_character="${TERM#?}"
term_just_first_character="${TERM%$term_without_first_character}"
term_just_first_character="${TERM%"$term_without_first_character"}"
terminfo_sub_directory="$term_just_first_character/$TERM"
if [ "$TERMINFO" = "" ]; then

View file

@ -569,7 +569,7 @@ image_reference_get_basename()
image="$1"
domain=$(image_reference_get_domain "$image")
remainder=${image#$domain}
remainder=${image#"$domain"}
path=${remainder%:*}
basename=${path##*/}
echo "$basename"
@ -590,7 +590,7 @@ image_reference_get_tag()
image="$1"
domain=$(image_reference_get_domain "$image")
remainder=${image#$domain}
remainder=${image#"$domain"}
tag=""
if (echo "$remainder" | grep ":" >/dev/null 2>&3); then