Skip to content

Commit 074dbfa

Browse files
authored
[Github][CI] Add quotes to 'find' command argument (#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.
1 parent d0d2162 commit 074dbfa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/build-ci-container-tooling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
}
102102
103103
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
104-
for f in $(find . -iname *.tar); do
104+
for f in $(find . -iname '*.tar'); do
105105
image_name=$(podman load -q -i $f | sed 's/Loaded image: //g')
106106
push_container $image_name
107107

.github/workflows/build-ci-container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
}
104104
105105
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
106-
for f in $(find . -iname *.tar); do
106+
for f in $(find . -iname '*.tar'); do
107107
image_name=$(podman load -q -i $f | sed 's/Loaded image: //g')
108108
push_container $image_name
109109

0 commit comments

Comments
 (0)