فهرست منبع

Refactor vcpkg cache cleanup commands to use PowerShell syntax

yhirose 1 ماه پیش
والد
کامیت
990b1aa9f9
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      .github/workflows/test.yaml

+ 2 - 2
.github/workflows/test.yaml

@@ -144,8 +144,8 @@ jobs:
           core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
     - name: Clean vcpkg cache for different configurations
       run: |
-        if exist "$env:VCPKG_ROOT\installed" rmdir /s /q "$env:VCPKG_ROOT\installed"
-        if exist "$env:VCPKG_ROOT\packages" rmdir /s /q "$env:VCPKG_ROOT\packages"
+        if (Test-Path "$env:VCPKG_ROOT\installed") { Remove-Item -Recurse -Force "$env:VCPKG_ROOT\installed" }
+        if (Test-Path "$env:VCPKG_ROOT\packages") { Remove-Item -Recurse -Force "$env:VCPKG_ROOT\packages" }
       shell: pwsh
     - name: Setup msbuild on windows
       uses: microsoft/setup-msbuild@v2