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:
parent
995c6d175e
commit
de1c17804d
2 changed files with 3 additions and 3 deletions
|
@ -83,7 +83,7 @@ if [ -f /run/.containerenv ] \
|
||||||
if [ "$TERM" != "" ]; then
|
if [ "$TERM" != "" ]; then
|
||||||
error_message="Error: terminfo entry not found for $TERM"
|
error_message="Error: terminfo entry not found for $TERM"
|
||||||
term_without_first_character="${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"
|
terminfo_sub_directory="$term_just_first_character/$TERM"
|
||||||
|
|
||||||
if [ "$TERMINFO" = "" ]; then
|
if [ "$TERMINFO" = "" ]; then
|
||||||
|
|
4
toolbox
4
toolbox
|
@ -569,7 +569,7 @@ image_reference_get_basename()
|
||||||
image="$1"
|
image="$1"
|
||||||
|
|
||||||
domain=$(image_reference_get_domain "$image")
|
domain=$(image_reference_get_domain "$image")
|
||||||
remainder=${image#$domain}
|
remainder=${image#"$domain"}
|
||||||
path=${remainder%:*}
|
path=${remainder%:*}
|
||||||
basename=${path##*/}
|
basename=${path##*/}
|
||||||
echo "$basename"
|
echo "$basename"
|
||||||
|
@ -590,7 +590,7 @@ image_reference_get_tag()
|
||||||
image="$1"
|
image="$1"
|
||||||
|
|
||||||
domain=$(image_reference_get_domain "$image")
|
domain=$(image_reference_get_domain "$image")
|
||||||
remainder=${image#$domain}
|
remainder=${image#"$domain"}
|
||||||
|
|
||||||
tag=""
|
tag=""
|
||||||
if (echo "$remainder" | grep ":" >/dev/null 2>&3); then
|
if (echo "$remainder" | grep ":" >/dev/null 2>&3); then
|
||||||
|
|
Loading…
Reference in a new issue