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 authored and BaiJiangJie committed Dec 19, 2024
1 parent 95c483b commit 61e5b22
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 61e5b22

Please sign in to comment.