Commit 9b56482
authored
[codex] Document and harden helper binstub PATH fix (#1201)
## Summary
- Adds an `[Unreleased]` changelog entry for #1200 as the `10.2.1`
patch-release item.
- Treats `PATH=""` as a single empty PATH entry, matching shell lookup
semantics by resolving it to the launch directory in helper binstubs.
- Adds regression coverage for a wholly empty PATH alongside the
existing leading/trailing empty PATH entry cases.
## Review context
- Adversarial Claude review was triggered on the merged #1200 fix and
completed successfully:
https://github.com/shakacode/shakapacker/actions/runs/28724619218
- Claude final review comment:
#1200 (comment)
- Claude found no blocker in the #1200 code path, but flagged the
missing changelog entry as a release-process blocker and noted the
untested `PATH=""` edge case addressed here.
- Local Codex review of `v10.2.0..main` found no actionable issues.
## Validation
- `bundle exec rspec spec/shakapacker/helper_binstubs_spec.rb
spec/shakapacker/binstub_sync_spec.rb`
- `ruby -c lib/install/bin/shakapacker-config && ruby -c
lib/install/bin/diff-bundler-config && ruby -c
spec/dummy/bin/shakapacker-config`
- `yarn test --runInBand test/configExporter/createBinStub.test.js
test/package/configExporter/cli.test.js`
- `bundle exec rubocop --cache false lib/install/bin/shakapacker-config
lib/install/bin/diff-bundler-config spec/dummy/bin/shakapacker-config
spec/shakapacker/helper_binstubs_spec.rb`
- `yarn type-check`
- `git diff --check`
- `.agents/bin/validate`
## Release note
Yes: because `v10.2.0` shipped the Ruby-binstub regression and #1200 is
the only code delta from `v10.2.0` to `main`, this should be released as
`10.2.1`.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed shell-compatible helper binstub behavior to restore reliable
Node lookup when `PATH` is unset/empty.
* Improved `PATH` normalization by defensively handling empty/blank
values and preserving trailing-empty fields, ensuring consistent
absolute-path `PATH` construction.
* Applied the same more robust `PATH` handling to generated Ruby
binstubs and related helper scripts.
* **Tests**
* Expanded helper binstubs coverage to include a wholly empty (`""`)
`PATH` case.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent aa94c79 commit 9b56482
6 files changed
Lines changed: 22 additions & 5 deletions
File tree
- lib/install/bin
- package/configExporter
- spec
- dummy/bin
- shakapacker
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
563 | | - | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
564 | 567 | | |
565 | 568 | | |
566 | 569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| 540 | + | |
540 | 541 | | |
541 | 542 | | |
542 | 543 | | |
543 | | - | |
| 544 | + | |
544 | 545 | | |
545 | 546 | | |
546 | 547 | | |
| |||
0 commit comments