Execute the assertion blocks with Python instead
This commit is contained in:
parent
d92713930e
commit
ad10b2cc4c
3 changed files with 9 additions and 1 deletions
|
|
@ -119,7 +119,11 @@ for commit_hash in "${commits[@]}"; do
|
|||
echo "git-check-assertions block $block_num:"
|
||||
printf '%s' "$block" | sed 's/^/> /'
|
||||
check_assertions() {
|
||||
bash -euo pipefail -c "$block"
|
||||
python3 - "$block" <<-EOF
|
||||
import sys
|
||||
import subprocess
|
||||
subprocess.run(sys.argv[1], shell=True, check=True)
|
||||
EOF
|
||||
}
|
||||
if ! check_assertions; then
|
||||
echo "git-check-assertions block failed in $commit_hash" >&2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue