Skip to content

Commit da66a3c

Browse files
committed
[CI] Use -execdir to run pdflatex from the same dir and exit from 'find' on error
1 parent e7b455c commit da66a3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
sudo apt-get install texlive*
2121
- name: Build
2222
run: |
23-
find . -iname '*.tex' -exec sh -c 'cd $(echo {}|cut -d"/" -f2) && pdflatex -output-directory $GITHUB_WORKSPACE $GITHUB_WORKSPACE/{}' \;
23+
find . -iname '*.tex' -execdir pdflatex -output-directory $GITHUB_WORKSPACE {} \; || exit 1
2424
- uses: actions/upload-artifact@v4
2525
with:
2626
name: pdf-linux
@@ -39,7 +39,7 @@ jobs:
3939
- name: Build
4040
run: |
4141
eval "$(/usr/libexec/path_helper)"
42-
find . -iname '*.tex' -exec sh -c 'cd $(echo {}|cut -d"/" -f2) && pdflatex -output-directory $GITHUB_WORKSPACE $GITHUB_WORKSPACE/{}' \;
42+
find . -iname '*.tex' -execdir pdflatex -output-directory $GITHUB_WORKSPACE {} \; || exit 1
4343
- uses: actions/upload-artifact@v4
4444
with:
4545
name: pdf-macos

0 commit comments

Comments
 (0)