diff options
author | 2024-04-03 21:33:40 +0100 | |
---|---|---|
committer | 2024-04-07 00:53:59 -0700 | |
commit | 316f39e9abf275badca3fe12aadf4ec445adcdfb (patch) | |
tree | 7a7d89b0a002bb66e39ceae52802895194c6c732 /scripts/install_eval_deps.sh | |
parent | Merge pull request #206 from python-discord/dependabot/github_actions/ci-depe... (diff) |
Use xargs over find -exec to ensure exit code is returned properly
Running this script in it's previous form (via `docker compose run`) always returned an exit code of 0.
This is due to `find` always returning a 0 exit code, unless an error occurred while traversing the directories.
Diffstat (limited to 'scripts/install_eval_deps.sh')
-rw-r--r-- | scripts/install_eval_deps.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/install_eval_deps.sh b/scripts/install_eval_deps.sh index 716d513..8fa5316 100644 --- a/scripts/install_eval_deps.sh +++ b/scripts/install_eval_deps.sh @@ -1,5 +1,5 @@ set -euo pipefail export PYTHONUSERBASE=/snekbox/user_base -find /lang/python -mindepth 1 -maxdepth 1 -type d -exec \ - {}/bin/python -m pip install --user -U -r requirements/eval-deps.pip \; +find /lang/python -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0I{} bash -c \ + '{}/bin/python -m pip install --user -U -r requirements/eval-deps.pip' \; |