Commit c165b2c 1 parent 07682da commit c165b2c Copy full SHA for c165b2c
File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -12,20 +12,24 @@ jobs:
12
12
13
13
- name : Add Invalid Path
14
14
run : |
15
- echo "D:\InvalidPath" >> $env:GITHUB_PATH
15
+ echo "D:\InvalidPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
16
16
echo "Updated PATH: $env:PATH"
17
+ shell : pwsh
17
18
18
19
- name : Verify Invalid Path Added
19
20
run : echo $env:PATH
21
+ shell : pwsh
20
22
21
23
- name : Clean PATH
22
24
run : |
23
- $env:PATH = ($env:PATH -split ';' | Where-Object { Test-Path $_ }) -join ';'
24
- echo "Cleaned PATH: $env:PATH"
25
- echo $env:PATH >> $env:GITHUB_PATH
25
+ $cleanedPath = ($env:PATH -split ';' | Where-Object { Test-Path $_ }) -join ';'
26
+ echo $cleanedPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
27
+ echo "Cleaned PATH: $cleanedPath"
28
+ shell : pwsh
26
29
27
30
- name : Verify Invalid Path Removed
28
31
run : echo $env:PATH
32
+ shell : pwsh
29
33
30
34
- name : Set up Python
31
35
uses : actions/setup-python@v5
You can’t perform that action at this time.
0 commit comments