Skip to content

Conversation

@szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented Jan 27, 2026

Use the cargo_bin! macro from assert_cmd to locate the sentry-cli binary via Cargo's environment variables rather than filesystem discovery. This allows tests to work with custom build-dir configurations like:

[build]
build-dir = "/Users/dszoke/.cargo/build-cache"

Custom build directories help share dependencies across projects and reduce disk usage. See Cargo build directory documentation.

@szokeasaurusrex szokeasaurusrex changed the title fix(tests): Use cargo_bin macro for binary discovery in tests test: Use cargo_bin macro for binary discovery in tests Jan 27, 2026
@szokeasaurusrex szokeasaurusrex added the skip-changelog Apply this label to PRs that do not contain any user-facing changes label Jan 27, 2026
@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review January 27, 2026 12:02
@szokeasaurusrex szokeasaurusrex requested a review from a team as a code owner January 27, 2026 12:02
Use the `cargo_bin!` macro from assert_cmd to locate the sentry-cli
binary. This reads the `CARGO_BIN_EXE_sentry-cli` environment variable
set by Cargo at compile time, making tests work regardless of custom
`build-dir` settings in cargo config.

Previously, both `Command::cargo_bin()` and trycmd's internal binary
discovery would fail when a custom build directory was configured,
causing tests to either error or silently pass as "ignored".

Co-Authored-By: Claude <noreply@anthropic.com>
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/test-fix branch from 0b68411 to 53f3fa2 Compare January 27, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Apply this label to PRs that do not contain any user-facing changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants