Commit 7259df4
authored
fix(interpreter): set BASH_SOURCE[0] when running bash /path/script.sh (#1037)
## Summary
- Push script file path onto `bash_source_stack` before executing via
`bash /path/script.sh`
- Pop after execution completes
## Test plan
- [x] Spec tests: BASH_SOURCE[0] value, dirname pattern
- [x] Full test suite passes
Closes #9421 parent aeb21c1 commit 7259df4
File tree
2 files changed
+27
-0
lines changed- crates/bashkit
- src/interpreter
- tests/spec_cases/bash
2 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2759 | 2759 | | |
2760 | 2760 | | |
2761 | 2761 | | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
2762 | 2768 | | |
2763 | 2769 | | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
2764 | 2776 | | |
2765 | 2777 | | |
2766 | 2778 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments