From 67154938ea29c447e24d075fe6b9c8153601b06b Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 27 Jan 2021 01:29:04 -0800 Subject: [PATCH] tox.ini: exit non-zero if any command fails `find` only exits non-zero if finding something failed, ignoring any exec'd program exit status. use bash and xargs to preserve the non-zero exit status --- tox.ini | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 967a67a..2b45a03 100644 --- a/tox.ini +++ b/tox.ini @@ -15,6 +15,9 @@ setenv = deps = dzcb~=0.1 commands = - /usr/bin/env find {toxinidir}/input \ - -name "generate.sh" \ - {env:FIND_OPTS} -exec \{\} ; + /usr/bin/env bash -c " \ + find {toxinidir}/input \ + -name "generate.sh" \ + {env:FIND_OPTS} -print0 | \ + xargs -0 -n 1 bash \ + "