Cd into files and then install requirements?

You could try command substitution to assign the output to a bash variable and then use a if to check if it contains a particular string of text.

OUT_LOG=$(ci/scripts/test_python_module.sh)
if [[ "$OUT_LOG" == "*traceback error*" ]]; then echo "traceback error detected" ; fi

Another option would be redirecting the output (stdout and/or stderr) when running the script to a file, and using grep/sed to search the file for output indicating that there is a traceback error.

1 Like