fix(ci): Windows 安装 Git 改用 cmd,避免 PowerShell 执行策略限制
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -54,13 +54,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Git (bash)
|
- name: Install Git (bash)
|
||||||
shell: powershell
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
if (-not (Get-Command bash -ErrorAction SilentlyContinue)) {
|
where bash >nul 2>&1 || winget install Git.Git --source winget --accept-source-agreements --accept-package-agreements
|
||||||
winget install Git.Git --source winget --accept-source-agreements --accept-package-agreements
|
echo C:\Program Files\Git\bin>> %GITHUB_PATH%
|
||||||
$env:PATH = "C:\Program Files\Git\bin;$env:PATH"
|
|
||||||
[System.Environment]::SetEnvironmentVariable('PATH', $env:PATH, 'Machine')
|
|
||||||
}
|
|
||||||
|
|
||||||
- name: Compile (Flutter Windows)
|
- name: Compile (Flutter Windows)
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
Reference in New Issue
Block a user