Skip to content

Commit 954bd78

Browse files
committed
Fix issue
1 parent 77f13fe commit 954bd78

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

.github/workflows/windows-build-and-test.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@ jobs:
3737
# Instead of exit, refresh PATH to ensure new commands are available
3838
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
3939
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"
5656
5757
- name: Install dependencies
5858
shell: powershell

0 commit comments

Comments
 (0)