Skip to content

Commit 075b902

Browse files
committed
Fix the sed -i logic for ubuntu as it doesn't take an empty extension
1 parent fcf91dc commit 075b902

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ deps =
3838
devdeps: git+https://github.com/astropy/pyvo.git#egg=pyvo
3939
devdeps: git+https://github.com/astropy/astroquery.git#egg=astroquery
4040

41-
allowlist_externals = bash, sed, npx
41+
allowlist_externals = bash, npx
4242

4343
commands =
4444
pip freeze
@@ -55,7 +55,9 @@ commands =
5555

5656
!buildhtml: pytest --nbval-lax -vv --suppress-no-test-exit-code --durations=10 tutorials
5757

58-
buildhtml: bash -c "find tutorials -name '*md' | grep -f ignore_testing | sort | uniq | xargs -n 1 sed -i '' -e 's|name: python3|name: python3\nskip_execution: true|g'"
58+
# sed -i needs a bit of hacky conditional on ubuntu to cover the case of an empty ignore
59+
buildhtml: bash -c "find tutorials -name '*md' | grep -f ignore_testing | sort | uniq > ignore_execute; if [ -s ignore_execute ]; then cat ignore_execute | xargs -n 1 sed -i -e 's|name: python3|name: python3\nskip_execution: true|g';fi"
60+
5961
buildhtml: npx myst build --execute
6062
buildhtml: bash rm _build/html/*thebe*.js
6163

0 commit comments

Comments
 (0)