From 65e202113883482952ff507e3fd8eec82adbbdc2 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Sat, 30 May 2026 23:58:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E7=BC=BA=E5=B0=91=20try=20=E5=9D=97=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=20macOS=20=E7=BC=96=E8=AF=91=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=EF=BC=9BCI=20=E8=87=AA=E5=8A=A8=E5=AE=89=E8=A3=85=20Git=20bash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/deploy.yml | 9 +++++++++ client/lib/core/utils/print_util_stub.dart | 2 ++ 2 files changed, 11 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 9b72015..b2c14d5 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -53,6 +53,15 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Git (bash) + shell: powershell + 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') + } + - name: Compile (Flutter Windows) shell: bash run: sh scripts/ci/compile-windows.sh "${{ gitea.ref_name }}" diff --git a/client/lib/core/utils/print_util_stub.dart b/client/lib/core/utils/print_util_stub.dart index 05779c6..9bc42bb 100644 --- a/client/lib/core/utils/print_util_stub.dart +++ b/client/lib/core/utils/print_util_stub.dart @@ -54,6 +54,7 @@ Future printProductLabelImpl({ String shopAddress = '', String shopPhone = '', }) async { + try { final font = await _loadFont(); final doc = pw.Document(); final qrImage = pw.MemoryImage(qrBytes); @@ -382,6 +383,7 @@ pw.Widget _sig(pw.Font font, pw.Font bold, String label) { } Future printStockInOrderImpl(StockInOrder order) async { + try { final font = await _loadFont(); final bold = await _loadBoldFont();