Skip to content

Commit

Permalink
Merge pull request #25 from corbob/issue21
Browse files Browse the repository at this point in the history
Issue21

Thank you @corbob ! Testing this on my end then getting ready for release!!
  • Loading branch information
scrthq authored Oct 23, 2019
2 parents 8f7272b + 14d5c63 commit 4239ac6
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions PSProfile/Classes/PSProfile.Classes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -638,22 +638,37 @@ if ($env:AWS_PROFILE) {
$g = 0
$b = 0
$pInfo.EnumerateDirectories('.git',[System.IO.SearchOption]::AllDirectories) | ForEach-Object {
$PathName = $_.Parent.BaseName
$FullPathName = $_.Parent.FullName
$g++
$this._log(
"Found git project @ $($_.Parent.FullName)",
"Found git project @ $($FullPathName)",
'FindProjects',
'Verbose'
)
$this.GitPathMap[$_.Parent.BaseName] = $_.Parent.FullName
$bldPath = [System.IO.Path]::Combine($_.Parent.FullName,'build.ps1')
$currPath = $_
while($this.GitPathMap.ContainsKey($PathName)){
$currPath = $currPath.Parent
$doublePath = [System.IO.DirectoryInfo]::new($this.GitPathMap[$PathName])
$this.GitPathMap["$($doublePath.Parent)\$($doublePath.BaseName)"] = $doublePath.FullName
$this.GitPathMap.Remove($PathName)
if($this.PSBuildPathMap.ContainsKey($PathName)){
$PSBuildPath = [System.IO.DirectoryInfo]::new($this.PSBuildPathMap[$PathName])
$this.PSBuildPathMap["$($PSBuildPath.Parent)\$($PSBuildPath.BaseName)"] = $doublePath.FullName
$this.PSBuildPathMap.Remove($PathName)
}
$PathName = "$($currPath.Parent.BaseName)\$PathName"
}
$this.GitPathMap[$PathName] = $FullPathName
$bldPath = [System.IO.Path]::Combine($FullPathName,'build.ps1')
if ([System.IO.File]::Exists($bldPath)) {
$b++
$this._log(
"Found build script @ $($_.FullName)",
'FindProjects',
'Verbose'
)
$this.PSBuildPathMap[$_.Parent.BaseName] = $_.Parent.FullName
$this.PSBuildPathMap[$PathName] = $FullPathName
}
}
$this._log(
Expand Down

0 comments on commit 4239ac6

Please sign in to comment.