]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
scripts: use end-of-options marker in `find -exec` commands
authorViktor Szakats <commit@vsz.me>
Mon, 10 Nov 2025 15:49:11 +0000 (16:49 +0100)
committerViktor Szakats <commit@vsz.me>
Mon, 10 Nov 2025 17:52:29 +0000 (18:52 +0100)
Closes #19450

.github/workflows/checksrc.yml
.github/workflows/http3-linux.yml
.github/workflows/macos.yml
.github/workflows/non-native.yml
.github/workflows/windows.yml
Makefile.am
appveyor.sh
scripts/maketgz

index 8f79f1ca6d478329bc794b0c4e4ac8c290c90d87..7aa8faf6a23471798bcd60aa3a153295b7ccb1c9 100644 (file)
@@ -91,7 +91,7 @@ jobs:
       - name: 'pytype'
         run: |
           source ~/venv/bin/activate
-          find . -name '*.py' -exec pytype -j auto -k {} +
+          find . -name '*.py' -exec pytype -j auto -k -- {} +
 
       - name: 'ruff'
         run: |
index d242c06116014afe400505d20e3ae003301597c3..a844eb6c14227de505073ca49523bece52cfbdfb 100644 (file)
@@ -587,7 +587,7 @@ jobs:
           cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose
           ln -s libquiche.so target/release/libquiche.so.0
           mkdir -v quiche/deps/boringssl/src/lib
-          find target/release \( -name libcrypto.a -o -name libssl.a \) -exec ln -vnf '{}' quiche/deps/boringssl/src/lib \;
+          find target/release \( -name libcrypto.a -o -name libssl.a \) -exec ln -vnf -- '{}' quiche/deps/boringssl/src/lib \;
 
           # include dir
           # /home/runner/quiche/quiche/deps/boringssl/src/include
index 0e0d03bc4f014ba5038eb1cd1c217d41b36ae73f..fc624dc09a5d542cb2c060a7caca07f1c8136a0a 100644 (file)
@@ -184,7 +184,7 @@ jobs:
           fi
 
       - name: 'curl info'
-        run: find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -exec file '{}' \;
+        run: find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -exec file -- '{}' \;
 
       - name: 'build tests'
         run: |
index 523a6761e6fdb210673f07eb1ef647ebef6b9136..7813c694a5d8c60ba12c41cd837e94ba0ec485a0 100644 (file)
@@ -310,7 +310,7 @@ jobs:
           fi
 
       - name: 'curl info'
-        run: find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -exec file '{}' \;
+        run: find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -exec file -- '{}' \;
 
       - name: 'build tests'
         run: |
index bcb846d806569b2dcf89083aeb18d15392c5e9a2..15a586b12fc712e6ffc39d426710ad43f4ba405e 100644 (file)
@@ -133,7 +133,7 @@ jobs:
         timeout-minutes: 1
         run: |
           PATH=/usr/bin
-          find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
+          find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
           if [ "${MATRIX_BUILD}" = 'cmake' ]; then
             PATH="$PWD/bld/lib:$PATH"
           fi
@@ -337,7 +337,7 @@ jobs:
             # avoid libtool's curl.exe wrapper for shared builds
             mv bld/src/.libs/curl.exe bld/src/curl.exe || true
           fi
-          find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
+          find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
           if [ "${MATRIX_TEST}" != 'uwp' ]; then  # curl: error initializing curl library
             bld/src/curl.exe --disable --version
           fi
@@ -548,7 +548,7 @@ jobs:
       - name: 'curl -V'
         timeout-minutes: 1
         run: |
-          /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
+          /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
           PATH="$PWD/bld/lib:$PATH"
           bld/src/curl.exe --disable --version
 
@@ -667,7 +667,7 @@ jobs:
           fi
 
       - name: 'curl info'
-        run: find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
+        run: find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
 
       - name: 'build tests'
         if: ${{ matrix.build == 'cmake' && matrix.compiler != 'clang-tidy' }}  # Save time by skipping this for autotools and clang-tidy
@@ -907,7 +907,7 @@ jobs:
       - name: 'curl -V'
         timeout-minutes: 1
         run: |
-          /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file '{}' \;
+          /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \;
           if [ "${MATRIX_PLAT}" != 'uwp' ]; then  # Missing: ucrtbased.dll, VCRUNTIME140D.dll, VCRUNTIME140D_APP.dll
             PATH="$PWD/bld/lib/${MATRIX_TYPE}:$PATH"
             "bld/src/${MATRIX_TYPE}/curl.exe" --disable --version
index 7b2f05f92e56dab64b4fd30653654ed9b4fef00b..f60c50e5ac54e6351f15b16ae05b5edaa8e82ea0 100644 (file)
@@ -91,7 +91,7 @@ pkgconfig_DATA = libcurl.pc
 
 dist-hook:
        rm -rf $(top_builddir)/tests/log
-       find $(distdir) -name "*.dist" -exec rm {} \;
+       find $(distdir) -name "*.dist" -exec rm -- {} \;
        (distit=`find $(srcdir) -name "*.dist" | grep -v Makefile`; \
        for file in $$distit; do \
          strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
index 4be76095ee4ad519b0f90ea866e9c595510d33f5..81407f7f33182fca3b8bf797c7a57031a8827744 100644 (file)
@@ -98,7 +98,7 @@ elif [ "${BUILD_SYSTEM}" = 'VisualStudioSolution' ]; then
   curl="build/Win32/${VC_VERSION}/${PRJ_CFG}/curld.exe"
 fi
 
-find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file '{}' \;
+find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \;
 if [ -z "${SKIP_RUN:-}" ]; then
   "${curl}" --disable --version
 else
index d7059554d34b8c68660985cfac6ff1836d19ecdc..e6bc53dcdc1b696f78b34f262ec943e88817404b 100755 (executable)
@@ -70,7 +70,7 @@ fi
 # As a precaution, remove all *.dist files that may be lying around, to reduce
 # the risk of old leftovers getting shipped.
 echo "removing all old *.dist files"
-find . -name "*.dist" -exec rm {} \;
+find . -name "*.dist" -exec rm -- {} \;
 
 numeric="$(printf "%02x%02x%02x\n" "$major" "$minor" "$patch")"
 
@@ -184,7 +184,7 @@ retar() {
   mkdir "$tempdir"
   cd "$tempdir"
   gzip -dc "../$targz" | tar -xf -
-  find curl-* -depth -exec touch -c -t "$filestamp" '{}' +
+  find curl-* -depth -exec touch -c -t "$filestamp" -- '{}' +
   tar --create --format=ustar --owner=0 --group=0 --numeric-owner --sort=name curl-* | gzip --best --no-name > out.tar.gz
   mv out.tar.gz ../
   cd ..