@@ -159,6 +159,33 @@ function Refresh-SessionPath {
159159 $env: Path = " $machinePath ;$userPath "
160160}
161161
162+ # Print PATH entries one per line for quick verification (scope: Session|Machine|User)
163+ function Print-PathEntries {
164+ param (
165+ [ValidateSet (" Session" , " Machine" , " User" )]
166+ [string ]$Scope = " Session"
167+ )
168+
169+ switch ($Scope ) {
170+ ' Session' { $pathValue = $env: Path }
171+ ' Machine' { $pathValue = [Environment ]::GetEnvironmentVariable(' Path' , ' Machine' ) }
172+ ' User' { $pathValue = [Environment ]::GetEnvironmentVariable(' Path' , ' User' ) }
173+ }
174+
175+ if (-not $pathValue ) {
176+ Write-Warn " PATH ($Scope ) is empty or not available."
177+ return
178+ }
179+
180+ Write-Info " PATH ($Scope ) entries (one per line):"
181+ $entries = $pathValue -split ' ;' | ForEach-Object { $_.Trim () } | Where-Object { $_ -ne ' ' }
182+ $index = 0
183+ foreach ($entry in $entries ) {
184+ $index ++
185+ Write-Host (" {0:D2}: {1}" -f $index , $entry )
186+ }
187+ }
188+
162189function Install-Maven {
163190 if (Test-CommandExists " mvn" ) {
164191 Write-Warn " mvn already available. Skipping Maven install."
@@ -266,6 +293,11 @@ if ($DryRun) {
266293 Write-Host " ===> Mode: Silent (default)." - ForegroundColor Yellow
267294}
268295
296+ # Print PATH before installation for quick verification
297+ Print- PathEntries - Scope " Session"
298+ Print- PathEntries - Scope " Machine"
299+ Print- PathEntries - Scope " User"
300+
269301if ($Help ) {
270302 Write-Host " " - ForegroundColor Cyan
271303 Write-Host " Usage: .\scripts\windows\setup_env_min.ps1 [ -DryRun ] [ -Interactive ] [ -Silent ] [ -Help ]" - ForegroundColor Cyan
@@ -315,6 +347,11 @@ Refresh-SessionPath
315347
316348Set-JavaHome
317349
350+ # Rebuild session path after JAVA_HOME changes and print PATH after installation
351+ Refresh- SessionPath
352+ Print- PathEntries - Scope " Session"
353+ Print- PathEntries - Scope " User"
354+
318355Invoke-Verify
319356
320357Write-Host " `n`n Awesome, all set!" - ForegroundColor Green
0 commit comments