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
|
||||
|
||||
- name: Install Git (bash)
|
||||
shell: powershell
|
||||
shell: cmd
|
||||
run: |
|
||||
if (-not (Get-Command bash -ErrorAction SilentlyContinue)) {
|
||||
winget install Git.Git --source winget --accept-source-agreements --accept-package-agreements
|
||||
$env:PATH = "C:\Program Files\Git\bin;$env:PATH"
|
||||
[System.Environment]::SetEnvironmentVariable('PATH', $env:PATH, 'Machine')
|
||||
}
|
||||
where bash >nul 2>&1 || winget install Git.Git --source winget --accept-source-agreements --accept-package-agreements
|
||||
echo C:\Program Files\Git\bin>> %GITHUB_PATH%
|
||||
|
||||
- name: Compile (Flutter Windows)
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user