Open alpha-beta-soup opened 1 year ago
I think correct behaviour in this case should be a non-zero exit, but with a more explict message that the input is empty.
One current workaround
FEATURE_COUNT=$(ogrinfo -so {datasource} {layer} | sed -n 's/Feature Count: //p');
if [ "$FEATURE_COUNT" -eq '0' ]; then
echo "{layer} is empty, skipping" && mkdir -p {output}
else
vector2dggs h3 ...
fi;
Using this in a workflow, one input (Postgres table) was empty (which is valid). Instead of doing nothing and exiting gracefully, I get the following traceback: