Skip to content

Commit 4740b83

Browse files
committed
adjust indentation and merge from main
2 parents fbd4c04 + e220d11 commit 4740b83

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

vendor/lib/lib_git.cmd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ exit /b
187187
:::===============================================================================
188188
:::is_git_shim - Check if the directory has a git.shim file
189189
:::.
190+
:::description:
191+
:::.
192+
::: Shim is a small helper program for Scoop that calls the executable configured in git.shim file
193+
::: See: github.com/ScoopInstaller/Shim and github.com/cmderdev/cmder/pull/1905
194+
:::.
190195
:::include:
191196
:::.
192197
::: call "$0"
@@ -202,7 +207,7 @@ exit /b
202207

203208
:is_git_shim
204209
pushd "%~1"
205-
:: check if there's shim - and if yes follow the path
210+
:: check if there is a shim file - if yes, read the actual executable path
206211
setlocal enabledelayedexpansion
207212
if exist git.shim (
208213
for /F "tokens=2 delims== " %%I in (git.shim) do (

vendor/psmodules/Cmder.ps1

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ function readVersion($gitPath) {
1818
}
1919

2020
function isGitShim($gitPath) {
21-
# check if there's shim - and if yes follow the path
21+
# check if there is a shim file - if yes, read the actual executable path
22+
# See: github.com/ScoopInstaller/Shim
2223

2324
if (Test-Path "${gitPath}\git.shim") {
2425
$shim = (get-content "${gitPath}\git.shim")
@@ -178,27 +179,27 @@ function getGitStatusSetting() {
178179
}
179180

180181
function yOrn( $question ) {
181-
Do {
182-
$Answer = Read-Host -Prompt "`n${question}? (y/n) "
183-
}
184-
Until ($Answer -eq 'y' -or $Answer -eq 'n' -or $Answer -eq 'yes' -or $Answer -eq 'no')
182+
Do {
183+
$Answer = Read-Host -Prompt "`n${question}? (y/n) "
184+
}
185+
Until ($Answer -eq 'y' -or $Answer -eq 'n' -or $Answer -eq 'yes' -or $Answer -eq 'no')
185186

186-
return $Answer
187+
return $Answer
187188
}
188189

189190
function templateExpand($template_filename, $outfile) {
190-
$template = Get-Content "$template_filename" -Raw
191+
$template = Get-Content "$template_filename" -Raw
191192

192-
$expanded = Invoke-Expression "@`"`r`n$template`r`n`"@"
193+
$expanded = Invoke-Expression "@`"`r`n$template`r`n`"@"
193194

194-
$overwrite = 'y'
195-
if ((test-path "$outfile")) {
196-
$overwrite = yOrn "'$outfile' already exists do you want to overwrite it"
197-
}
195+
$overwrite = 'y'
196+
if ((test-path "$outfile")) {
197+
$overwrite = yOrn "'$outfile' already exists do you want to overwrite it"
198+
}
198199

199-
if ($overwrite -match 'y') {
200-
$expanded | out-file -ErrorAction silentlycontinue -encoding ascii "$outfile"
201-
} else {
202-
write-host "Skipping Cmder '$shell' config generation at user request!"
203-
}
200+
if ($overwrite -match 'y') {
201+
$expanded | out-file -ErrorAction silentlycontinue -encoding ascii "$outfile"
202+
} else {
203+
write-host "Skipping Cmder '$shell' config generation at user request!"
204+
}
204205
}

0 commit comments

Comments
 (0)