Skip to content

Replace BASH_SOURCE with $0 in install script#19

Merged
MatthewDolan merged 1 commit intomainfrom
claude/fix-bash-source-error-1qB7p
Feb 20, 2026
Merged

Replace BASH_SOURCE with $0 in install script#19
MatthewDolan merged 1 commit intomainfrom
claude/fix-bash-source-error-1qB7p

Conversation

@MatthewDolan
Copy link
Owner

Summary

Updated the install script to use $0 instead of ${BASH_SOURCE[0]} for determining the script directory.

Changes

  • Replaced "$(dirname "${BASH_SOURCE[0]}")" with "$(dirname "$0")" in the script directory detection logic

Details

This change simplifies the script by using the more portable $0 variable instead of the bash-specific BASH_SOURCE array. The $0 variable contains the name of the script being executed and is supported across all POSIX-compliant shells, making the script more compatible if it's ever executed with different shell interpreters.

https://claude.ai/code/session_01VUqhAw3sgVSX5soHQXtk2Y

Replace bash-specific BASH_SOURCE[0] with $0, which is the correct
way to get the current script path in zsh.

https://claude.ai/code/session_01VUqhAw3sgVSX5soHQXtk2Y
@MatthewDolan MatthewDolan merged commit 80285b3 into main Feb 20, 2026
1 check passed
@MatthewDolan MatthewDolan deleted the claude/fix-bash-source-error-1qB7p branch February 20, 2026 01:34
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.

2 participants