mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 16:57:18 +00:00
ci: no-exit: Skip check if no files to check
If we find no files to check, gracefully quit the test. Formerly, if the list was empty we ended up trying to read from stdin, and thus hung. Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
parent
1c453a372e
commit
6268ba4aa3
@ -22,6 +22,8 @@ for f in $candidates; do
|
||||
files="$f $files"
|
||||
done
|
||||
|
||||
[ -z "$files" ] && echo "No files to check, skipping" && exit 0
|
||||
|
||||
if egrep -n '\<os\.Exit\>' $files; then
|
||||
echo "Direct calls to os.Exit() are forbidden, please use exit() so atexit() works"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user