mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Use local variables in log functions
This commit is contained in:
parent
e9884d0d9a
commit
035c0a8550
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user