Merge pull request #152197 from K900/patch-3

rust/hooks: ensure the build output ends up in the right place
This commit is contained in:
Jörg Thalheim 2021-12-28 11:33:07 +00:00 committed by GitHub
commit 61d501ee3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,9 @@ cargoBuildHook() {
runHook preBuild runHook preBuild
if [ ! -z "${buildAndTestSubdir-}" ]; then if [ ! -z "${buildAndTestSubdir-}" ]; then
# ensure the output doesn't end up in the subdirectory
export CARGO_TARGET_DIR="$(pwd)/target"
pushd "${buildAndTestSubdir}" pushd "${buildAndTestSubdir}"
fi fi