From 477d4086b22eee6e6d2469eafb68206b8a9e637f Mon Sep 17 00:00:00 2001 From: shanshanzhong Date: Fri, 7 Nov 2025 03:10:06 -0800 Subject: [PATCH] =?UTF-8?q?ci(workflow):=20=E4=BF=AE=E5=A4=8DWindows?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E4=B8=ADjq=E5=AE=89=E8=A3=85=E5=92=8C?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=85=8D=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复当choco未安装时jq安装失败的问题,并确保安装后jq可被正确识别 --- .gitea/workflows/docker.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index f8d764f..7aca3b8 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -131,14 +131,7 @@ jobs: shell: cmd run: call copy_libcore.bat - - name: Install jq - shell: powershell - run: choco install jq -y - - name: Setup Flutter - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.24.5' - channel: 'stable' + - name: Install jq\n shell: powershell\n run: |\n if (!(Get-Command choco -ErrorAction SilentlyContinue)) {\n Set-ExecutionPolicy Bypass -Scope Process -Force\n [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072\n iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))\n }\n choco install jq -y\n $env:Path = [System.Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path','User')\n jq --version\n\n- name: Setup Flutter\n uses: subosito/flutter-action@v2\n with:\n flutter-version: '3.24.5'\n channel: 'stable' - name: Enable Windows desktop run: flutter config --enable-windows-desktop