Skip to content

Commit

Permalink
Double quote to prevent globbing and word splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturWincenciak committed Jan 4, 2023
1 parent a6953c9 commit d058124
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ echo "- auto commit re-formatted code (-a): '$AUTO_COMMIT'"
echo "--- --- ---"
echo ""

if [ $INPUT_FAIL_ON_REFORMAT_NEEDED != "yes" ] && [ $INPUT_FAIL_ON_REFORMAT_NEEDED != "no" ]
if [ "$INPUT_FAIL_ON_REFORMAT_NEEDED" != "yes" ] && [ "$INPUT_FAIL_ON_REFORMAT_NEEDED" != "no" ]
then
echo ""
echo "--- --- ---"
Expand All @@ -25,7 +25,7 @@ then
exit $INVALID_ARGUMENT_ERROR
fi

if [ $AUTO_COMMIT != "yes" ] && [ $INPUT_AUTO_COMMIT != "no" ]
if [ "$AUTO_COMMIT" != "yes" ] && [ "$INPUT_AUTO_COMMIT" != "no" ]
then
echo ""
echo "--- --- ---"
Expand All @@ -41,7 +41,7 @@ echo "--- --- ---"
echo "Your setup:"
echo "- fail on re-format needed: '$INPUT_FAIL_ON_REFORMAT_NEEDED'"
echo "- auto commit re-formatted code: '$INPUT_AUTO_COMMIT'"
if [ $INPUT_FAIL_ON_REFORMAT_NEEDED = "yes" ] && [ $INPUT_AUTO_COMMIT = "yes" ]
if [ "$INPUT_FAIL_ON_REFORMAT_NEEDED" = "yes" ] && [ "$INPUT_AUTO_COMMIT" = "yes" ]
then
echo "NOTICE: you have set that the execution will fast fail on re-format needed"
echo "NOTICE: auto commit will not be executed because the execution will terminate with fail when re-format is needed"
Expand Down Expand Up @@ -72,7 +72,7 @@ then
exit $SUCCESS
fi

if [ $INPUT_FAIL_ON_REFORMAT_NEEDED = "yes" ]
if [ "$INPUT_FAIL_ON_REFORMAT_NEEDED" = "yes" ]
then
echo ""
echo "--- --- ---"
Expand All @@ -82,7 +82,7 @@ then
exit $EXIT_WITH_FAST_FAIL
fi

if [ $INPUT_AUTO_COMMIT = "no" ]
if [ "$INPUT_AUTO_COMMIT" = "no" ]
then
echo ""
echo "--- --- ---"
Expand Down

0 comments on commit d058124

Please sign in to comment.