mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +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.
|
# Function to log start of a operation.
|
||||||
step_log() {
|
step_log() {
|
||||||
message=$1
|
local message=$1
|
||||||
printf "\n\033[90;1m==> \033[0m\033[37;1m%s\033[0m\n" "$message"
|
printf "\n\033[90;1m==> \033[0m\033[37;1m%s\033[0m\n" "$message"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to log result of a operation.
|
# Function to log result of a operation.
|
||||||
add_log() {
|
add_log() {
|
||||||
mark=$1
|
local mark=$1
|
||||||
subject=$2
|
local subject=$2
|
||||||
message=$3
|
local message=$3
|
||||||
if [ "$mark" = "$tick" ]; then
|
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"
|
printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user