Skip to content

Commit fcfb6ad

Browse files
build: fix cargo-vendor-dir handling
Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
1 parent 2c1c964 commit fcfb6ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/release.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pre_fetch_cargo_deps() {
3737

3838
local outLink="--no-out-link"
3939
local cargoVendorMsg=""
40+
local cargoVendorDir=""
4041
if [ -n "$CARGO_VENDOR_DIR" ]; then
4142
if [ "$(realpath -s "$CARGO_VENDOR_DIR")" = "$(realpath -s "$SCRIPTDIR/..")" ]; then
4243
cargoVendorDir="$CARGO_VENDOR_DIR/$GIT_BRANCH"
@@ -45,11 +46,11 @@ pre_fetch_cargo_deps() {
4546
fi
4647

4748
outLink="--out-link "$cargoVendorDir""
48-
cargoVendorMsg="into $(realpath -s "$cargoVendorDir") "
4949
fi
5050

5151
for (( attempt=1; attempt<=maxAttempt; attempt++ )); do
5252
if $NIX_BUILD $outLink -A "$nixAttrPath"; then
53+
[ -n "$cargoVendorDir" ] && cargoVendorMsg="into $(realpath -s "$cargoVendorDir") "
5354
echo "Cargo vendored dependencies pre-fetched "$cargoVendorMsg"after $attempt attempt(s)"
5455
return 0
5556
fi

0 commit comments

Comments
 (0)