Skip to content

Commit

Permalink
If files are not generated from the commands, then remove the directo…
Browse files Browse the repository at this point in the history
…ry created

- Adjusted code for the case where the subscriptions folder or the cluster service version folder are empty they will be removed from the directory
  • Loading branch information
ReggieRichardson authored and frnckdlprt committed Feb 13, 2024
1 parent bca255f commit 513e156
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generate_postmortem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ for NAMESPACE in $NAMESPACE_LIST; do
[ $? -eq 0 ] || rm -f "${ICS_SUBSCRIPTION_YAML_OUTPUT}/${sub}.out"
done <<< "$OUTPUT"
else
rm -fr $ICS_INSTALL_PLAN_DATA
rm -fr $ICS_SUBSCRIPTION_DATA
fi

OUTPUT=`$KUBECTL get ClusterServiceVersion -n $NAMESPACE 2>/dev/null`
Expand All @@ -1854,7 +1854,7 @@ for NAMESPACE in $NAMESPACE_LIST; do
[ $? -eq 0 ] || rm -f "${ICS_CLUSTER_SERVICE_VERSION_YAML_OUTPUT}/${csv}.out"
done <<< "$OUTPUT"
else
rm -fr $ICS_INSTALL_PLAN_DATA
rm -fr $ICS_CLUSTER_SERVICE_VERSION_DATA
fi
fi
#------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 513e156

Please sign in to comment.