Replace BASH_SOURCE with $0 in install script#19
Merged
MatthewDolan merged 1 commit intomainfrom Feb 20, 2026
Merged
Conversation
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
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
Updated the install script to use
$0instead of${BASH_SOURCE[0]}for determining the script directory.Changes
"$(dirname "${BASH_SOURCE[0]}")"with"$(dirname "$0")"in the script directory detection logicDetails
This change simplifies the script by using the more portable
$0variable instead of the bash-specificBASH_SOURCEarray. The$0variable 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