Skip to content

Commit 6feec24

Browse files
committed
Secure variable with quotes and curly braces
1 parent 1716618 commit 6feec24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gh-md-toc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ gh_toc(){
177177
sed -i "/${ts}/r ${toc_path}" "$gh_src"
178178
fi
179179
echo
180-
if [ $no_backup = "yes" ]; then
180+
if [ "${no_backup}" = "yes" ]; then
181181
rm ${toc_path} ${gh_src}${ext}
182182
fi
183183
echo "!! TOC was added into: '$gh_src'"
184-
if [ -z $no_backup ]; then
184+
if [ -z "${no_backup}" ]; then
185185
echo "!! Origin version of the file: '${gh_src}${ext}'"
186186
echo "!! TOC added into a separate file: '${toc_path}'"
187187
fi

0 commit comments

Comments
 (0)