mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #35120 from eparis/hack-sort
Automatic merge from submit-queue Use LC_ALL=C with sort In some user env LANG=C might lose: Wrong: ``` echo -e "test/images/port-forward-tester\ntest/images/porter" | LANG=C sort test/images/porter test/images/port-forward-tester ``` Right: ``` echo -e "test/images/port-forward-tester\ntest/images/porter" | LC_ALL=C sort test/images/port-forward-tester test/images/porter ```
This commit is contained in:
commit
10a0d2a468
@ -39,12 +39,12 @@ array_contains () {
|
|||||||
|
|
||||||
# Check that the file is in alphabetical order
|
# Check that the file is in alphabetical order
|
||||||
linted_file="${KUBE_ROOT}/hack/.linted_packages"
|
linted_file="${KUBE_ROOT}/hack/.linted_packages"
|
||||||
if ! diff -u "${linted_file}" <(LANG=C sort "${linted_file}"); then
|
if ! diff -u "${linted_file}" <(LC_ALL=C sort "${linted_file}"); then
|
||||||
{
|
{
|
||||||
echo
|
echo
|
||||||
echo "hack/.linted_packages is not in alphabetical order. Please sort it:"
|
echo "hack/.linted_packages is not in alphabetical order. Please sort it:"
|
||||||
echo
|
echo
|
||||||
echo " LANG=C sort -o hack/.linted_packages hack/.linted_packages"
|
echo " LC_ALL=C sort -o hack/.linted_packages hack/.linted_packages"
|
||||||
echo
|
echo
|
||||||
} >&2
|
} >&2
|
||||||
false
|
false
|
||||||
@ -104,7 +104,7 @@ else
|
|||||||
for p in "${linted[@]}"; do
|
for p in "${linted[@]}"; do
|
||||||
echo " echo $p >> hack/.linted_packages"
|
echo " echo $p >> hack/.linted_packages"
|
||||||
done
|
done
|
||||||
echo " LANG=C sort -o hack/.linted_packages hack/.linted_packages"
|
echo " LC_ALL=C sort -o hack/.linted_packages hack/.linted_packages"
|
||||||
echo
|
echo
|
||||||
echo 'You can test via this script and commit the result.'
|
echo 'You can test via this script and commit the result.'
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user