mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
chore(code_layout): use env var and pipe to bypass the "Argument list too long" error (again)
This commit is contained in:
parent
ac54a16a52
commit
37eec98dbf
4
.github/workflows/code_layout.yml
vendored
4
.github/workflows/code_layout.yml
vendored
@ -170,8 +170,8 @@ jobs:
|
||||
- name: Spell Test
|
||||
if: steps.changed_files.outputs.any_changed == 'true'
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }}
|
||||
run: echo "$ALL_CHANGED_FILES" | ./scripts/spell_check/check_spelling.sh
|
||||
ALL_CHANGED_FILES: ${{ steps.changed_files.outputs.changed_files }}
|
||||
run: ./scripts/spell_check/check_spelling.sh
|
||||
|
||||
sip_check:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -61,16 +61,24 @@ while getopts ":rdl:" opt; do
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
# check pipe or command line
|
||||
if [ -p /dev/stdin ]; then
|
||||
# with pipe input
|
||||
# check if file list is provided
|
||||
# * from a pipe or from a file
|
||||
# * from ALL_CHANGED_FILES env var
|
||||
# * from command line parameters
|
||||
if [ -p /dev/stdin ] || [ ! -t 0 ]; then
|
||||
# read from pipe input or file
|
||||
read SCRIPT_INPUT
|
||||
if [ -z "$SCRIPT_INPUT" ]; then
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
# no pipe input
|
||||
SCRIPT_INPUT="$@"
|
||||
if [ -z "$ALL_CHANGED_FILES" ]; then
|
||||
# read from command line parameters
|
||||
SCRIPT_INPUT="$@"
|
||||
else
|
||||
# read from env var
|
||||
SCRIPT_INPUT="$ALL_CHANGED_FILES"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$SCRIPT_INPUT" ]; then
|
||||
@ -82,6 +90,7 @@ if [ -n "$SCRIPT_INPUT" ]; then
|
||||
echo "Running spell check on files: $INPUTFILES"
|
||||
else
|
||||
INPUTFILES="."
|
||||
echo "Running spell check on all files!"
|
||||
fi
|
||||
|
||||
# regex to find escape string
|
||||
|
Loading…
x
Reference in New Issue
Block a user