#!/usr/bin/env bash
#
# Cargo runner that runs a built binary with the prebuilt libduckdb (fetched via
# DUCKDB_DOWNLOAD_LIB) on the dynamic-library load path. libduckdb-sys does not
# set an rpath for downloaded libraries, so without this the loader could pick up
# a missing or incompatible system libduckdb.
#
# This wraps every test/run binary in the workspace, including crates that don't
# use duckdb, so locating the library must never fail the command: if no download
# is found we simply exec the binary unchanged.
libdir=""
if [; then
fi