From 3ef8116e8352bd5b1f342baa7c6c983d8e0a0c2f Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Tue, 16 Apr 2024 11:04:24 +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 9eed24fff..926c68ef7 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