Skip to content

fix(justfile): resolve cargo target dir for staging sidecar copy#1700

Merged
matt2e merged 1 commit into
mainfrom
buzz
Jul 10, 2026
Merged

fix(justfile): resolve cargo target dir for staging sidecar copy#1700
matt2e merged 1 commit into
mainfrom
buzz

Conversation

@matt2e

@matt2e matt2e commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The just staging recipe copied the CLI sidecar binary from a hardcoded target/release/buzz path. On machines where cargo's target directory is redirected (e.g. via CARGO_TARGET_DIR or a build.target-dir config), that path doesn't exist and the copy fails.

This resolves the actual target directory via cargo metadata --format-version 1 --no-deps and copies the built buzz binary from <target_directory>/release/buzz instead.

Test plan

  • Ran just staging on a machine with a redirected cargo target dir; the sidecar stub is now replaced with the real CLI binary and tauri dev picks it up.
  • Full local test suite passed on push (rust, desktop, desktop-tauri, mobile).

🤖 Generated with Claude Code

@matt2e matt2e requested a review from a team as a code owner July 10, 2026 01:48
`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 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e merged commit a088822 into main Jul 10, 2026
25 checks passed
@matt2e matt2e deleted the buzz branch July 10, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants