File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 - name : Disable Windows Defender
5757 if : runner.os == 'Windows'
5858 shell : powershell
59- run : Set-MpPreference -DisableRealtimeMonitoring $true
59+ run : |
60+ try {
61+ Set-MpPreference -DisableRealtimeMonitoring $true -ErrorAction Stop
62+ } catch {
63+ Write-Warning "Unable to disable Windows Defender real-time monitoring: $_"
64+ }
6065
6166 # Add: Configure Git longpaths on Windows
6267 - name : Configure Git (Windows)
Original file line number Diff line number Diff line change @@ -254,7 +254,12 @@ jobs:
254254 - uses : actions/checkout@v4
255255 - name : Disable Windows Defender
256256 shell : powershell
257- run : Set-MpPreference -DisableRealtimeMonitoring $true
257+ run : |
258+ try {
259+ Set-MpPreference -DisableRealtimeMonitoring $true -ErrorAction Stop
260+ } catch {
261+ Write-Warning "Unable to disable Windows Defender real-time monitoring: $_"
262+ }
258263 - name : Init git submodules
259264 run : git submodule update --init --recursive --depth 1
260265 - name : Setup Rust toolchain
@@ -408,7 +413,12 @@ jobs:
408413 - uses : actions/checkout@v4
409414 - name : Disable Windows Defender
410415 shell : powershell
411- run : Set-MpPreference -DisableRealtimeMonitoring $true
416+ run : |
417+ try {
418+ Set-MpPreference -DisableRealtimeMonitoring $true -ErrorAction Stop
419+ } catch {
420+ Write-Warning "Unable to disable Windows Defender real-time monitoring: $_"
421+ }
412422 - name : Setup node
413423 uses : actions/setup-node@v4
414424 with :
You can’t perform that action at this time.
0 commit comments