fix POSIX compliance in sed expressions in 'g push'

This commit is contained in:
William Hilton 2022-12-05 17:47:45 -05:00
parent 048f842376
commit 4ad9256ee3
No known key found for this signature in database
GPG key ID: 9609B8A5928BA6B9

4
bin/g
View file

@ -419,8 +419,8 @@ else
# Get local branch name
local_branch=$(git rev-parse --abbrev-ref HEAD)
# Check for multiple remotes
remote_count=$(git remote show | wc -l)
remotes=$(git remote show | tr '\n' ' ' | sed 's/\s*$//g')
remote_count=$(git remote show | wc -l | sed 's/[[:space:]]*//g')
remotes=$(git remote show | tr '\n' ' ' | sed 's/[[:space:]]*$//g')
if [ "$remote_count" = "0" ]; then
echo "No remotes configured yet"
exit