Fix Git hook detecting global PowerShell but trying to use dotnet tool
fixes c5f6dcd4e
This commit is contained in:
parent
9a737444c4
commit
e19c8fe5f5
|
@ -4,5 +4,5 @@ pwsh="$(command -v pwsh)"
|
|||
if [ -z "$pwsh" ]; then pwsh="$(command -v dotnet) pwsh"; fi
|
||||
if ! ("$pwsh" -v >/dev/null 2>/dev/null); then exit 0; fi
|
||||
kind="$(basename "$0")"
|
||||
dotnet pwsh "./Dist/git_hooks/$kind.ps1" "$@"
|
||||
if [ -e "./Dist/git_hooks/$kind.local.ps1" ]; then dotnet pwsh "./Dist/git_hooks/$kind.local.ps1" "$@"; fi
|
||||
"$pwsh" "./Dist/git_hooks/$kind.ps1" "$@"
|
||||
if [ -e "./Dist/git_hooks/$kind.local.ps1" ]; then "$pwsh" "./Dist/git_hooks/$kind.local.ps1" "$@"; fi
|
||||
|
|
Loading…
Reference in New Issue