Skip to content

fix(interpreter): set BASH_SOURCE[0] when running bash /path/script.sh#1037

Merged
chaliy merged 1 commit intomainfrom
fix/issue-942-bash-source
Apr 3, 2026
Merged

fix(interpreter): set BASH_SOURCE[0] when running bash /path/script.sh#1037
chaliy merged 1 commit intomainfrom
fix/issue-942-bash-source

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 3, 2026

Summary

  • Push script file path onto bash_source_stack before executing via bash /path/script.sh
  • Pop after execution completes

Test plan

  • Spec tests: BASH_SOURCE[0] value, dirname pattern
  • Full test suite passes

Closes #942

@chaliy chaliy force-pushed the fix/issue-942-bash-source branch from 2924c05 to 90d42bc Compare April 3, 2026 10:52
@chaliy chaliy merged commit 7259df4 into main Apr 3, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-942-bash-source branch April 3, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BASH_SOURCE[0] is empty when running bash /path/script.sh

1 participant