Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(python): exit with success status if no samples found #1153

Merged
merged 3 commits into from
Jul 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -eo pipefail
shopt -s globstar

# Exit early if samples don't exist
if ! compgen -G "./samples/**/requirements.txt" > /dev/null; then
if ! find samples -name 'requirements.txt' | grep -q .; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, find is going to emit a message on stderr for the case that the samples directory doesn't exist, e.g.:

$ find nonesuch -name foobar.txt
find: ‘nonesuch’: No such file or directory

echo "No tests run. './samples/**/requirements.txt' not found"
exit 0
fi
Expand Down