Skip to content

Commit

Permalink
perf: get config only last
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Dec 13, 2024
1 parent 95c483b commit 507e5c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function has_config() {
function get_config() {
key=$1
default=${2-''}
value=$(grep "^${key}=" "${CONFIG_FILE}" | awk -F= '{ print $2 }' | awk -F' ' '{ print $1 }')
value=$(grep "^${key}=" "${CONFIG_FILE}" | awk -F= '{ print $2 }' | awk -F' ' '{ print $1 }' | tail -1)
if [[ -z "$value" ]];then
value="$default"
fi
Expand Down

0 comments on commit 507e5c6

Please sign in to comment.