Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #568 +/- ##
=======================================
Coverage 79.04% 79.04%
=======================================
Files 48 48
Lines 7235 7235
Branches 7235 7235
=======================================
Hits 5719 5719
Misses 1141 1141
Partials 375 375 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request updates the build_usage_binary function in the shell completion integration tests to check for the CARGO_BIN_EXE_usage environment variable. A review comment suggests enhancing this check by filtering out empty strings to avoid potential panics when the path is used later.
Greptile SummaryThis PR adds a small but meaningful fix to Why this matters:
Key observations:
Confidence Score: 5/5Safe to merge — the change is minimal, well-scoped, and the only remaining feedback is a low-priority style suggestion. No P0 or P1 issues. The logic is correct: runtime env-var lookup with an empty-string guard, followed by an early return. The single P2 note about No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[build_usage_binary called] --> B{CARGO_BIN_EXE_usage set\nand non-empty?}
B -- Yes --> C[Return PathBuf from env var\ne.g. /nix/store/.../bin/usage]
B -- No --> D[Locate CARGO_MANIFEST_DIR\nfind workspace root]
D --> E[Run: cargo build --bin usage]
E --> F{Build successful?}
F -- No --> G[panic! with stderr]
F -- Yes --> H[Return workspace_root/target/debug/usage]
C --> I[Tests use binary path\nfor shell completion tests]
H --> I
Reviews (2): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile |
this is needed incase the build directory includes a target tripplet. see: - https://github.com/NixOS/nixpkgs/blob/75e64f8ebde8e90df2643e5b82677b93ba33d922/doc/languages-frameworks/rust.section.md#tests-relying-on-the-structure-of-the-target-directory-tests-relying-on-the-structure-of-the-target-directory - https://doc.rust-lang.org/cargo/reference/build-cache.html
### 🐛 Bug Fixes - **(zsh)** escape values without descriptions by [@david-hamilton-glean](https://github.com/david-hamilton-glean) in [#597](#597) - use CARGO_BIN_EXE_usage if set by [@kybe236](https://github.com/kybe236) in [#568](#568) ### 📚 Documentation - add releases nav and aube lock by [@jdx](https://github.com/jdx) in [#593](#593) - add linux optional packages to aube lock by [@jdx](https://github.com/jdx) in [#594](#594) ### 📦️ Dependency Updates - pin dtolnay/rust-toolchain action to 631a55b by [@renovate[bot]](https://github.com/renovate[bot]) in [#562](#562) - update codecov/codecov-action digest to 75cd116 by [@renovate[bot]](https://github.com/renovate[bot]) in [#563](#563) - update pnpm/action-setup digest to b906aff by [@renovate[bot]](https://github.com/renovate[bot]) in [#566](#566) - update jdx/mise-action digest to 5228313 by [@renovate[bot]](https://github.com/renovate[bot]) in [#565](#565) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#569](#569) - update dtolnay/rust-toolchain digest to 29eef33 by [@renovate[bot]](https://github.com/renovate[bot]) in [#571](#571) - update swatinem/rust-cache digest to e18b497 by [@renovate[bot]](https://github.com/renovate[bot]) in [#572](#572) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#574](#574) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#575](#575) - update taiki-e/upload-rust-binary-action digest to 10c1cf6 by [@renovate[bot]](https://github.com/renovate[bot]) in [#576](#576) - update rust crate ctor to 0.9 by [@renovate[bot]](https://github.com/renovate[bot]) in [#577](#577) - update actions/configure-pages action to v6 by [@renovate[bot]](https://github.com/renovate[bot]) in [#579](#579) - update rust crate indexmap to v2.14.0 by [@renovate[bot]](https://github.com/renovate[bot]) in [#578](#578) - update codecov/codecov-action action to v6 by [@renovate[bot]](https://github.com/renovate[bot]) in [#581](#581) - update actions/deploy-pages action to v5 by [@renovate[bot]](https://github.com/renovate[bot]) in [#580](#580) - update pnpm/action-setup action to v5 by [@renovate[bot]](https://github.com/renovate[bot]) in [#583](#583) - update jdx/mise-action action to v4 by [@renovate[bot]](https://github.com/renovate[bot]) in [#582](#582) - update pnpm/action-setup action to v6 by [@renovate[bot]](https://github.com/renovate[bot]) in [#584](#584) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#585](#585) - update rust crate clap to v4.6.1 by [@renovate[bot]](https://github.com/renovate[bot]) in [#586](#586) - update rust crate ctor to 0.10 by [@renovate[bot]](https://github.com/renovate[bot]) in [#587](#587) - update actions/upload-pages-artifact action to v5 by [@renovate[bot]](https://github.com/renovate[bot]) in [#588](#588) - update rust crate assert_cmd to v2.2.1 by [@renovate[bot]](https://github.com/renovate[bot]) in [#589](#589) - update taiki-e/upload-rust-binary-action digest to f0d45ae by [@renovate[bot]](https://github.com/renovate[bot]) in [#590](#590) - update dependency eslint to v10.2.1 by [@renovate[bot]](https://github.com/renovate[bot]) in [#591](#591) - update pnpm/action-setup digest to 078e9d4 by [@renovate[bot]](https://github.com/renovate[bot]) in [#592](#592) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#595](#595) ### New Contributors - @david-hamilton-glean made their first contribution in [#597](#597) - @kybe236 made their first contribution in [#568](#568) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [usage](https://github.com/jdx/usage) | patch | `3.2.0` → `3.2.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>jdx/usage (usage)</summary> ### [`v3.2.1`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#321---2026-04-22) [Compare Source](jdx/usage@v3.2.0...v3.2.1) ##### 🐛 Bug Fixes - **(zsh)** escape values without descriptions by [@​david-hamilton-glean](https://github.com/david-hamilton-glean) in [#​597](jdx/usage#597) - use CARGO\_BIN\_EXE\_usage if set by [@​kybe236](https://github.com/kybe236) in [#​568](jdx/usage#568) ##### 📚 Documentation - add releases nav and aube lock by [@​jdx](https://github.com/jdx) in [#​593](jdx/usage#593) - add linux optional packages to aube lock by [@​jdx](https://github.com/jdx) in [#​594](jdx/usage#594) ##### 📦️ Dependency Updates - pin dtolnay/rust-toolchain action to [`631a55b`](jdx/usage@631a55b) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​562](jdx/usage#562) - update codecov/codecov-action digest to [`75cd116`](jdx/usage@75cd116) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​563](jdx/usage#563) - update pnpm/action-setup digest to [`b906aff`](jdx/usage@b906aff) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​566](jdx/usage#566) - update jdx/mise-action digest to [`5228313`](jdx/usage@5228313) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​565](jdx/usage#565) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​569](jdx/usage#569) - update dtolnay/rust-toolchain digest to [`29eef33`](jdx/usage@29eef33) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​571](jdx/usage#571) - update swatinem/rust-cache digest to [`e18b497`](jdx/usage@e18b497) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​572](jdx/usage#572) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​574](jdx/usage#574) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​575](jdx/usage#575) - update taiki-e/upload-rust-binary-action digest to [`10c1cf6`](jdx/usage@10c1cf6) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​576](jdx/usage#576) - update rust crate ctor to 0.9 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​577](jdx/usage#577) - update actions/configure-pages action to v6 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​579](jdx/usage#579) - update rust crate indexmap to v2.14.0 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​578](jdx/usage#578) - update codecov/codecov-action action to v6 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​581](jdx/usage#581) - update actions/deploy-pages action to v5 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​580](jdx/usage#580) - update pnpm/action-setup action to v5 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​583](jdx/usage#583) - update jdx/mise-action action to v4 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​582](jdx/usage#582) - update pnpm/action-setup action to v6 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​584](jdx/usage#584) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​585](jdx/usage#585) - update rust crate clap to v4.6.1 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​586](jdx/usage#586) - update rust crate ctor to 0.10 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​587](jdx/usage#587) - update actions/upload-pages-artifact action to v5 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​588](jdx/usage#588) - update rust crate assert\_cmd to v2.2.1 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​589](jdx/usage#589) - update taiki-e/upload-rust-binary-action digest to [`f0d45ae`](jdx/usage@f0d45ae) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​590](jdx/usage#590) - update dependency eslint to v10.2.1 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​591](jdx/usage#591) - update pnpm/action-setup digest to [`078e9d4`](jdx/usage@078e9d4) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​592](jdx/usage#592) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​595](jdx/usage#595) ##### New Contributors - [@​david-hamilton-glean](https://github.com/david-hamilton-glean) made their first contribution in [#​597](jdx/usage#597) - [@​kybe236](https://github.com/kybe236) made their first contribution in [#​568](jdx/usage#568) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMzYuMiIsInVwZGF0ZWRJblZlciI6IjQzLjEzNi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
Use CARGO_BIN_EXE_usage if set
This ensures the tests can locate the binary even if the build directory includes a target triple.
It requires the binary to be built beforehand, which is already the case in Nixpkgs (hence this PR/patch).
Not sure how to determine the correct path if the binary hasn't been built yet.
Mainly made this commit to make the tests pass in Nixpkgs:
NixOS/nixpkgs#504792
See: