[llvm] [Github][CI] Add quotes to 'find' command argument (PR #162570)
Baranov Victor via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 8 16:15:54 PDT 2025
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/162570
It appears that new [Build Tooling CI Containers](https://github.com/llvm/llvm-project/actions/runs/18359418540/job/52299833688) job run didn't actually push containers, but failed with error:
```
find: paths must precede expression: `ghcr.io-llvm-amd64-ci-ubuntu-24.04-lint-f1eb7e55428e.tar'
find: possible unquoted pattern after predicate `-iname'?
```
Proposed fix is in error message and I confirmed locally with such setup:
```bash
$ ls -la
a.sh
ghcr.io-ci-a.tar
ghcr.io-ci-b.tar
$ cat a.sh
for f in $(find . -iname '*.tar'); do
echo $f
done
$ ./a.sh # lists fine with quotes but fails without.
```
Thought not sure how `Build CI Container` job push successfully: I manually downloaded 900MB `tar` AMD-archive with two containers and failed to `for`-loop over them without quotes, hence I add them to that script as well.
>From e38840aeac3bf9648ab2d669aaceaee48b66f71e Mon Sep 17 00:00:00 2001
From: Victor Baranov <bar.victor.2002 at gmail.com>
Date: Thu, 9 Oct 2025 02:09:19 +0300
Subject: [PATCH] [Github][CI] Add quotes to 'find' command argument
---
.github/workflows/build-ci-container-tooling.yml | 2 +-
.github/workflows/build-ci-container.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build-ci-container-tooling.yml b/.github/workflows/build-ci-container-tooling.yml
index 8095a68cfda9e..7dd05f64ccd39 100644
--- a/.github/workflows/build-ci-container-tooling.yml
+++ b/.github/workflows/build-ci-container-tooling.yml
@@ -101,7 +101,7 @@ jobs:
}
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
- for f in $(find . -iname *.tar); do
+ for f in $(find . -iname '*.tar'); do
image_name=$(podman load -q -i $f | sed 's/Loaded image: //g')
push_container $image_name
diff --git a/.github/workflows/build-ci-container.yml b/.github/workflows/build-ci-container.yml
index 01f1b8dc4f990..027c558afdd0b 100644
--- a/.github/workflows/build-ci-container.yml
+++ b/.github/workflows/build-ci-container.yml
@@ -103,7 +103,7 @@ jobs:
}
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
- for f in $(find . -iname *.tar); do
+ for f in $(find . -iname '*.tar'); do
image_name=$(podman load -q -i $f | sed 's/Loaded image: //g')
push_container $image_name
More information about the llvm-commits
mailing list