@@ -37,22 +37,22 @@ jobs:
37
37
# Instead of exit, refresh PATH to ensure new commands are available
38
38
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
39
39
40
- # # Add this step if you specifically need to refresh all environment variables
41
- # - name: Refresh environment
42
- # shell: powershell
43
- # run: |
44
- # # Reload all environment variables
45
- # foreach($level in "Machine","User") {
46
- # [Environment]::GetEnvironmentVariables($level).GetEnumerator() | % {
47
- # # For Path variables, append rather than replace
48
- # if($_.Name -match 'Path$') {
49
- # $_.Value = [Environment]::GetEnvironmentVariable($_.Name, $level)
50
- # }
51
- # # Set the variable in current session
52
- # [Environment]::SetEnvironmentVariable($_.Name, $_.Value)
53
- # }
54
- # }
55
- # Write-Host "Environment refreshed"
40
+ # Add this step if you specifically need to refresh all environment variables
41
+ - name : Refresh environment
42
+ shell : powershell
43
+ run : |
44
+ # Reload all environment variables
45
+ foreach($level in "Machine","User") {
46
+ [Environment]::GetEnvironmentVariables($level).GetEnumerator() | % {
47
+ # For Path variables, append rather than replace
48
+ if($_.Name -match 'Path$') {
49
+ $_.Value = [Environment]::GetEnvironmentVariable($_.Name, $level)
50
+ }
51
+ # Set the variable in current session
52
+ [Environment]::SetEnvironmentVariable($_.Name, $_.Value)
53
+ }
54
+ }
55
+ Write-Host "Environment refreshed"
56
56
57
57
- name : Install dependencies
58
58
shell : powershell
0 commit comments