Skip to content

Commit

Permalink
Don't run get_and_print_hashes_of_main unless we need to
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jun 10, 2024
1 parent e139aa2 commit 72d56d7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/check-i18n.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ function update_file_i18n_hash() {
function main() {
process_CLI_args "$@"

get_and_print_hashes_of_main
if [[ -n $FLAG_INFO ]]; then return; fi
if [[ -n $FLAG_INFO ]]; then
get_and_print_hashes_of_main
return
fi

if [ -f "$TARGET_PATHS" ] ; then
TARGETS="$TARGET_PATHS"
Expand All @@ -236,6 +238,7 @@ function main() {
local FILE_PROCESSED_COUNT=0 # Number of TLP actually listed

if [[ $COMMIT_HASH_ARG == "head" ]]; then
if [[ -z $MAIN_HEAD_HASH ]]; then get_and_print_hashes_of_main; fi
COMMIT_HASH_ARG=$MAIN_HEAD_HASH
fi

Expand Down

0 comments on commit 72d56d7

Please sign in to comment.