ci(workflow): 修复Windows环境中jq安装和路径配置问题
修复当choco未安装时jq安装失败的问题,并确保安装后jq可被正确识别
This commit is contained in:
parent
7fc2a60e18
commit
477d4086b2
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user