From 035c0a8550db4ebc71ecf69611f73c2909aa98ba Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 10 Mar 2022 04:53:12 +0530 Subject: [PATCH] Use local variables in log functions --- src/scripts/unix.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/unix.sh b/src/scripts/unix.sh index 941c0e2d..05409eea 100644 --- a/src/scripts/unix.sh +++ b/src/scripts/unix.sh @@ -21,15 +21,15 @@ fi # Function to log start of a operation. step_log() { - message=$1 + local message=$1 printf "\n\033[90;1m==> \033[0m\033[37;1m%s\033[0m\n" "$message" } # Function to log result of a operation. add_log() { - mark=$1 - subject=$2 - message=$3 + local mark=$1 + local subject=$2 + local message=$3 if [ "$mark" = "$tick" ]; then printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" else