Skip to content

Commit

Permalink
Use xargs over find -exec to ensure exit code is returned properly
Browse files Browse the repository at this point in the history
Previously when running this command via docker compose run, the exit code was always 0.
This is because find always returns a 0 exit code unless an error occurred while traversing the directories
  • Loading branch information
ChrisLovering committed Apr 3, 2024
1 parent 3ff9321 commit 083fbba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/install_eval_deps.sh
Original file line number Diff line number Diff line change
@@ -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' \;

0 comments on commit 083fbba

Please sign in to comment.