Skip to content

Commit

Permalink
Secure variable with quotes and curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitounator committed Jan 30, 2021
1 parent 1716618 commit 6feec24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gh-md-toc
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ gh_toc(){
sed -i "/${ts}/r ${toc_path}" "$gh_src"
fi
echo
if [ $no_backup = "yes" ]; then
if [ "${no_backup}" = "yes" ]; then
rm ${toc_path} ${gh_src}${ext}
fi
echo "!! TOC was added into: '$gh_src'"
if [ -z $no_backup ]; then
if [ -z "${no_backup}" ]; then
echo "!! Origin version of the file: '${gh_src}${ext}'"
echo "!! TOC added into a separate file: '${toc_path}'"
fi
Expand Down

0 comments on commit 6feec24

Please sign in to comment.