dev-util/rust-script: check for Cargo config.toml before creation

https://public-inbox.gentoo.org/gentoo-dev/20240725180612.19453-2-chewi@gentoo.org/T/#u
will replace `config` with `config.toml`, thus cause the creation of the
latter to fail.

Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
This commit is contained in:
Lucio Sauer
2024-08-01 15:27:11 +02:00
parent c073cde00d
commit 457526eac5

View File

@@ -122,5 +122,7 @@ src_prepare() {
use debug || sed -i "s|/debug/|/release/|" tests/util/mod.rs || die
# cargo.eclass uses the old config and deprecation warning breaks the test.
ln -s "${ECARGO_HOME}/config" "${ECARGO_HOME}/config.toml" || die
if [[ ! -e "${ECARGO_HOME}/config.toml" ]]; then
ln -s "${ECARGO_HOME}/config" "${ECARGO_HOME}/config.toml" || die
fi
}