Skip to content

Commit

Permalink
add check for existing data before collecting
Browse files Browse the repository at this point in the history
Signed-off-by: Charlie Wheeler-Robinson <[email protected]>
  • Loading branch information
crwr45 committed Apr 15, 2024
1 parent 04b02b7 commit 911af80
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cmd/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,14 @@ EOF

audit_container > $DATADIR/repo_audit
if [ ! -z "$LOCAL_KUBECONFIG" ]; then
echo "Running Collection"
verify_env
collect_data
if [ -z "$( find $OUTPUTDIR/* -prune -type f 2>/dev/null )" ]; then
echo "Running Collection"
verify_env
collect_data
else
echo "Cannot run data collection when $OUTPUTDIR contains files."
exit 1
fi
else
echo "Skipping data collection"
fi
Expand Down

0 comments on commit 911af80

Please sign in to comment.