Skip to content

Commit 8ff46b5

Browse files
Adjust po file removal condition (#168)
* Adjust po file removal condition If the array is too big, the condition is not be checked. * Check condition using length Co-authored-by: Stan Ulbrych <[email protected]> * Update comment Co-authored-by: Stan Ulbrych <[email protected]> --------- Co-authored-by: Stan Ulbrych <[email protected]>
1 parent c44b84e commit 8ff46b5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/remove_untranslated.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ for po in $pofiles; do
2020
fi
2121
done
2222

23-
if [ -n "${to_remove[@]}" ]; then
24-
git rm ${to_remove[@]}
25-
else
23+
# Check array size. If not 0, then go ahead and remove them
24+
if [ ${#to_remove[@]} -eq 0 ]; then
2625
echo "No empty PO to remove."
26+
else
27+
git rm ${to_remove[@]}
2728
fi

0 commit comments

Comments
 (0)