Skip to content

Commit c976915

Browse files
committed
Shell code improvements
1 parent d6572c3 commit c976915

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/ci.yaml

+4-6
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ jobs:
3838
python -m build .
3939
4040
# ensure exactly one artifact was produced
41-
shopt -s nullglob
42-
DISTFILES=(dist/*.tar.gz)
43-
if [[ ${DISTFILES[@]} -ne 1 ]]; then
41+
[[ $(shopt -s nullglob; ls dist/*.tar.gz | wc -w) == 1 ]] || {
4442
echo "unexpected content in dist dir: $(ls dist/*.tar.gz)"
4543
exit 1
46-
fi
44+
}
4745
4846
- name: test sdist
4947
run: |
@@ -97,7 +95,7 @@ jobs:
9795
- name: build libyaml
9896
run: >
9997
docker run --rm
100-
--volume $(pwd):/io
98+
--volume "$(pwd):/io"
10199
--env LIBYAML_REF
102100
--env LIBYAML_REPO
103101
--workdir /io
@@ -154,7 +152,7 @@ jobs:
154152
run: >
155153
docker run --rm --tty --detach
156154
--name worker
157-
--volume $(pwd):/io
155+
--volume "$(pwd):/io"
158156
"$DOCKER_IMAGE"
159157
bash
160158

0 commit comments

Comments
 (0)