@@ -18,7 +18,8 @@ function readVersion($gitPath) {
1818}
1919
2020function 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
180181function 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
189190function 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