File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,11 @@ function Get-GitModule {
43
43
44
44
Write-Verbose - Message " $ ( Get-Date -f T) processing $P1 "
45
45
46
- $ModuleName = ( $P1 -split ' /' )[-1 ]
46
+ $ModuleName = $P1.Split ( ' /' )[-1 ]
47
47
$tempDir = Join-Path $tmpRoot $ModuleName
48
- if (! (Test-Path $tempDir )) {
48
+ if (! (Test-Path $tempDir ) {
49
+ # Strip .git from variables if a directory that ends with .git isn't located (backwards compatibility)
50
+ if ($tempDir -like ' *.git' ) { $ModuleName = ($tempDir = $tempDir -replace ' \.git$' ).Split(' /' )[-1 ] }
49
51
Write-Verbose - Message " $ ( Get-Date -f T) creating directory $tempDir "
50
52
New-Item $tempDir - ItemType Directory - Force | Out-Null
51
53
} elseif (Get-ChildItem $tempDir - Force) {
@@ -112,4 +114,4 @@ function Get-GitModule {
112
114
Write-Verbose - Message " $ ( Get-Date -f G) $FunctionName completed"
113
115
}
114
116
115
- }
117
+ }
You can’t perform that action at this time.
0 commit comments