From 42411d4bf95914fdde04eeb6a29dc626643bd87b Mon Sep 17 00:00:00 2001 From: corbob Date: Thu, 17 Oct 2019 21:17:19 -0700 Subject: [PATCH] Some more changes... This doesn't update the build paths if they already existed... --- PSProfile/Classes/PSProfile.Classes.ps1 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/PSProfile/Classes/PSProfile.Classes.ps1 b/PSProfile/Classes/PSProfile.Classes.ps1 index f26795f..4d92bd9 100644 --- a/PSProfile/Classes/PSProfile.Classes.ps1 +++ b/PSProfile/Classes/PSProfile.Classes.ps1 @@ -646,14 +646,13 @@ if ($env:AWS_PROFILE) { 'FindProjects', 'Verbose' ) - $currPath = $_.Parent + $currPath = $_ while($this.GitPathMap.ContainsKey($PathName)){ - $this._log( - "Uh oh... $PathName already exists for a git repository...", - 'FindProjects', - 'Warning' - ) - $PathName = "$PathName-$($currPath.Parent.BaseName)" + $currPath = $currPath.Parent + $doublePath = [System.IO.DirectoryInfo]::new($this.GitPathMap[$PathName]) + $this.GitPathMap["$($doublePath.Parent)\$($doublePath.BaseName)"] = $doublePath.FullName + $this.GitPathMap.Remove($PathName) + $PathName = "$($currPath.Parent.BaseName)\$PathName" } $this.GitPathMap[$PathName] = $FullPathName $bldPath = [System.IO.Path]::Combine($FullPathName,'build.ps1')