From 6a23f398b9513c72c4f130e00c6431fe8f289284 Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Tue, 16 Apr 2024 11:11:39 +0100 Subject: [PATCH] build: fix cargo-vendor-dir handling Signed-off-by: Tiago Castro --- scripts/release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/release.sh b/scripts/release.sh index 2600f043e..94b6a0896 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -37,6 +37,7 @@ pre_fetch_cargo_deps() { local outLink="--no-out-link" local cargoVendorMsg="" + local cargoVendorDir="" if [ -n "$CARGO_VENDOR_DIR" ]; then if [ "$(realpath -s "$CARGO_VENDOR_DIR")" = "$(realpath -s "$SCRIPTDIR/..")" ]; then cargoVendorDir="$CARGO_VENDOR_DIR/$GIT_BRANCH" @@ -45,11 +46,11 @@ pre_fetch_cargo_deps() { fi outLink="--out-link "$cargoVendorDir"" - cargoVendorMsg="into $(realpath -s "$cargoVendorDir") " fi for (( attempt=1; attempt<=maxAttempt; attempt++ )); do if $NIX_BUILD $outLink -A "$nixAttrPath"; then + [ -n "$cargoVendorDir" ] && cargoVendorMsg="into $(realpath -s "$cargoVendorDir") " echo "Cargo vendored dependencies pre-fetched "$cargoVendorMsg"after $attempt attempt(s)" return 0 fi