Skip to content

Commit

Permalink
Merge pull request git-for-windows#558 from Morilli/fix-reg-query
Browse files Browse the repository at this point in the history
getgit: Fix user path reg query result potentially getting truncated
  • Loading branch information
dscho authored Jun 12, 2024
2 parents 87b4bd9 + dba6db7 commit 636e970
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion git-extra/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pkgbase="mingw-w64-${_realname}"
pkgname=($_realname
"${MINGW_PACKAGE_PREFIX}-${_realname}")
_ver_base=1.1
pkgver=1.1.636.2db97b993
pkgver=1.1.641.031e03baf
pkgrel=1
pkgdesc="Git for Windows extra files"
arch=('any')
Expand Down
2 changes: 1 addition & 1 deletion git-extra/getgit
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ echo "be removed from the context menu is available as $rm_ctxmenu "
echo ""
# Setting ENV
echo -n "Setting env ..."
userpath=$(reg query "HKEY_CURRENT_USER\Environment" //v Path 2>/dev/null | awk 'NR==3 {print $NF}')
userpath="$(powershell -command '(Get-ItemProperty -Path 'HKCU:\Environment' -Name Path).Path')"
if [[ "$userpath" == "" ]]; then
setx PATH "$(cygpath -m /cmd)" > /dev/null 2>&1
elif [[ "$userpath" != *"$(cygpath -m /cmd)"* ]]; then
Expand Down

0 comments on commit 636e970

Please sign in to comment.