add notes on what shim actually is

This commit is contained in:
David Refoua 2024-10-17 19:43:14 +03:30 committed by GitHub
parent 540532f126
commit e220d114b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 185 additions and 179 deletions

View File

@ -187,6 +187,11 @@ exit /b
:::===============================================================================
:::is_git_shim - Check if the directory has a git.shim file
:::.
:::description:
:::.
::: Shim is a small helper program for Scoop that calls the executable configured in git.shim file
::: See: github.com/ScoopInstaller/Shim and github.com/cmderdev/cmder/pull/1905
:::.
:::include:
:::.
::: call "$0"
@ -202,7 +207,7 @@ exit /b
:is_git_shim
pushd "%~1"
:: check if there's shim - and if yes follow the path
:: check if there is a shim file - if yes, read the actual executable path
setlocal enabledelayedexpansion
if exist git.shim (
for /F "tokens=2 delims== " %%I in (git.shim) do (

View File

@ -18,7 +18,8 @@ function readVersion($gitPath) {
}
function isGitShim($gitPath) {
# check if there's shim - and if yes follow the path
# check if there is a shim file - if yes, read the actual executable path
# See: github.com/ScoopInstaller/Shim
if (Test-Path "${gitPath}\git.shim") {
$shim = (get-content "${gitPath}\git.shim")