From cdcf0a7457e7f2d7810f8f9a092517ba52911fd8 Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Fri, 10 Jul 2026 11:40:32 +1000 Subject: [PATCH] fix(justfile): resolve cargo target dir for staging sidecar copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `just staging` hardcoded `cp target/release/buzz`, which fails whenever CARGO_TARGET_DIR (or a cargo config `build.target-dir`) relocates build output away from ./target: the release build finishes fine, but the sidecar copy then can't find the binary. The package list was already correct — buzz-cli provides the `buzz` bin — only the artifact path was wrong. Resolve the effective target directory via `cargo metadata` before copying. Stock setups still resolve to ./target, so behavior there is unchanged. Co-Authored-By: Claude Fable 5 Signed-off-by: Matt Toohey --- Justfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Justfile b/Justfile index a69011d900..69e9bc663d 100644 --- a/Justfile +++ b/Justfile @@ -355,7 +355,8 @@ staging *ARGS: bootstrap _ensure-sidecar-stubs fi # Replace the 0-byte sidecar stub with the real CLI binary so tauri dev picks it up. TARGET=$(rustc -vV | sed -n 's|host: ||p') - cp target/release/buzz "desktop/src-tauri/binaries/buzz-${TARGET}" + TARGET_DIR=$(cargo metadata --format-version 1 --no-deps | node -p "JSON.parse(require('fs').readFileSync(0, 'utf8')).target_directory") + cp "${TARGET_DIR}/release/buzz" "desktop/src-tauri/binaries/buzz-${TARGET}" chmod +x "desktop/src-tauri/binaries/buzz-${TARGET}" cd {{desktop_dir}} export BUZZ_RELAY_URL="wss://sprout-oss.stage.blox.sqprod.co"