fix(cli): respect CARGO_TARGET_DIR in openshell wrapper script#2391
Merged
drew merged 1 commit intoJul 21, 2026
Merged
Conversation
jhjaggars
requested review from
a team,
derekwaynecarr,
maxamillion and
mrunalp
as code owners
July 21, 2026 13:28
|
All contributors have signed the DCO ✍️ ✅ |
The scripts/bin/openshell wrapper hardcoded the binary path to
$PROJECT_ROOT/target/debug/openshell. When CARGO_TARGET_DIR is set
(e.g. via .bashrc or mise), cargo places the binary elsewhere and the
wrapper fails with 'No such file or directory'.
Use ${CARGO_TARGET_DIR:-$PROJECT_ROOT/target} so the wrapper finds
the binary regardless of where the build artifacts live.
Signed-off-by: Jesse Jaggars <jjaggars@jjaggars-kubevirt.rht.csb>
Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
jhjaggars
force-pushed
the
fix-openshell-wrapper-cargo-target-dir
branch
from
July 21, 2026 13:30
db706ae to
6363555
Compare
Member
|
/ok-to-test 6363555 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
scripts/bin/openshellwrapper script hardcodes the binary path to$PROJECT_ROOT/target/debug/openshell. WhenCARGO_TARGET_DIRis set (e.g. via.bashrc, mise, or CI config), cargo places the binary in a different directory and the wrapper fails withNo such file or directory.This fix uses
${CARGO_TARGET_DIR:-$PROJECT_ROOT/target}so the wrapper resolves the binary path correctly regardless of where build artifacts are configured to live.Related Issue
N/A — discovered during local development setup.
Changes
$PROJECT_ROOT/target/debug/openshellbinary path with${CARGO_TARGET_DIR:-$PROJECT_ROOT/target}/debug/openshelltarget/directory whenCARGO_TARGET_DIRis not set (no behavior change for existing users)Testing
No such file or directorywhenCARGO_TARGET_DIRis setmise run pre-commitpasses (pre-existingpython:protofailure onmainunrelated to this change)Checklist