From f94a3170b1949c9d2f11ee65ae3e55671d56481d Mon Sep 17 00:00:00 2001 From: Taylor Eernisse Date: Mon, 9 Feb 2026 23:51:36 -0500 Subject: [PATCH] fix: install.sh finds binary under custom target triples Nightly toolchains with CARGO_BUILD_TARGET set (or .cargo/config.toml [build] target) put the binary in target//release/ instead of target/release/. The installer now falls back to a find search across all target subdirectories when the standard path doesn't exist. Co-Authored-By: Claude Opus 4.6 --- install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 5302c68..0b6ab7b 100755 --- a/install.sh +++ b/install.sh @@ -40,10 +40,16 @@ if ! (cd "$SCRIPT_DIR" && cargo build --release); then exit 1 fi +# Find the binary — handles custom target triples (e.g., CARGO_BUILD_TARGET +# puts it in target//release/ instead of target/release/) BINARY="$SCRIPT_DIR/target/release/$BINARY_NAME" if [[ ! -f "$BINARY" ]]; then - echo "ERROR: Build succeeded but binary not found at $BINARY" - echo " Check: ls $SCRIPT_DIR/target/release/" + BINARY=$(find "$SCRIPT_DIR/target" -name "$BINARY_NAME" -type f -path "*/release/*" ! -name "*.d" 2>/dev/null | head -1) +fi +if [[ -z "${BINARY:-}" || ! -f "$BINARY" ]]; then + echo "ERROR: Build succeeded but binary not found." + echo " Searched: $SCRIPT_DIR/target/*/release/$BINARY_NAME" + echo " Contents: $(ls "$SCRIPT_DIR/target/release/" 2>/dev/null || echo '(no target/release/)')" exit 1 fi echo "[ok] Built: $(ls -lh "$BINARY" | awk '{print $5}')"