File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed
PSProfile/Public/Configuration Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -380,7 +380,39 @@ function Start-PSProfileConfigurationHelper {
380
380
until ($decision -notmatch " [Yy]" )
381
381
}
382
382
7 {
383
-
383
+ if ($Global :PSProfile.ProjectPaths.Count ) {
384
+ .$current (($Global :PSProfile.ProjectPaths -join " , " ))
385
+ }
386
+ Write-Host " Would you like to add an additional Project Path to your PSProfile?"
387
+ $decision = Read-Host " [Y] Yes [N] No [X] Exit"
388
+ do {
389
+ switch - Regex ($decision ) {
390
+ " [Yy]" {
391
+ $item1 = Read-Host " Please enter the path to the additional project folder"
392
+ if ($null -eq (Get-PSProfileProjectPath - Name $item1 )) {
393
+ if (-not $changeHash.ContainsKey (' Project Paths' )) {
394
+ $changes.Add (" Project Paths:" )
395
+ $changeHash [' Project Paths' ] = @ ()
396
+ }
397
+ .$command (" Add-PSProfileProjectPath -Name '$item1 '" )
398
+ Add-PSProfileProjectPath - Name $item1 - Verbose
399
+ $changes.Add (" - $item1 " )
400
+ $changeHash [' Project Paths' ] += $item1
401
+ }
402
+ else {
403
+ .$warning (" Project Path '$item1 ' already exists on your PSProfile configuration! If you would like to overwrite it, run the following command:" )
404
+ .$command (" Add-PSProfileProjectPath -Name '$item1 ' -Force" )
405
+ }
406
+ " `n Would you like to add another Project Path to your PSProfile?" | Write-Host
407
+ $decision = Read-Host " [Y] Yes [N] No [X] Exit"
408
+ }
409
+ " [Xx]" {
410
+ " `n Exiting Configuration Helper!`n " | Write-Host - ForegroundColor Yellow
411
+ return
412
+ }
413
+ }
414
+ }
415
+ until ($decision -notmatch " [Yy]" )
384
416
}
385
417
8 {
386
418
You can’t perform that action at this time.
0 commit comments