Skip to content

Commit

Permalink
fix: bash version compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestelfer authored May 14, 2024
1 parent 3c7ee9c commit ed7005d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hooks/environment
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ git_config_add() {
local key="$1"
local value="$2"

index=$(( "${GIT_CONFIG_COUNT:-0}" - 1 ))
local currentCount="${GIT_CONFIG_COUNT:-0}"

index=$(( currentCount ))

# index is incremented each time a setting is added
index=$(( index + 1 ))
export GIT_CONFIG_COUNT=$(( index + 1 ))
export "GIT_CONFIG_KEY_${index}=${key}"
export "GIT_CONFIG_VALUE_${index}=${value}"
Expand Down

0 comments on commit ed7005d

Please sign in to comment.