From e26f7316ac138a50b44058e03b393373b7c5d222 Mon Sep 17 00:00:00 2001 From: Wendong-Fan Date: Tue, 20 Jan 2026 06:27:03 +0800 Subject: [PATCH] minor update based on review --- .github/workflows/build.yml | 9 ++++++++- package.json | 2 +- scripts/preinstall-deps.js | 10 ++++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a2904202..1dd0b679b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,6 +56,13 @@ jobs: - name: Install Dependencies run: npm install + # Install libfuse2 for Linux AppImage builds + - name: Install libfuse2 (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libfuse2 + # Step for macOS builds with signing - name: Build Release Files (macOS with signing) if: runner.os == 'macOS' @@ -185,4 +192,4 @@ jobs: release/win-x64/* release/linux-x64/* env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index aabe476df..9cdd64533 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "build:mac:test": "npm run preinstall-deps && npm run clean-symlinks && npm run compile-babel && tsc && vite build && electron-builder --mac && npm run test-signing", "build:win": "npm run preinstall-deps && npm run compile-babel && tsc && vite build && electron-builder --win", "build:linux": "npm run preinstall-deps && npm run clean-symlinks && npm run compile-babel && tsc && vite build && electron-builder --linux", - "build:all": "npm run preinstall-deps && npm run compile-babel && tsc && vite build && electron-builder --mac --win", + "build:all": "npm run preinstall-deps && npm run compile-babel && tsc && vite build && electron-builder --mac --win --linux", "preview": "vite preview", "pretest": "vite build --mode=test", "test": "vitest run", diff --git a/scripts/preinstall-deps.js b/scripts/preinstall-deps.js index b34f35a1d..a5ef3311e 100644 --- a/scripts/preinstall-deps.js +++ b/scripts/preinstall-deps.js @@ -399,12 +399,14 @@ async function installUv() { const targetPath = path.join(BIN_DIR, 'uv'); if (fs.existsSync(nestedUvPath)) { console.log(` Found uv in ${nestedDir}, moving...`); - if (fs.existsSync(targetPath)) fs.unlinkSync(targetPath); - fs.renameSync(nestedUvPath, targetPath); - // Clean up directory try { + if (fs.existsSync(targetPath)) fs.unlinkSync(targetPath); + fs.renameSync(nestedUvPath, targetPath); + // Clean up directory fs.rmSync(path.join(BIN_DIR, nestedDir), { recursive: true, force: true }); - } catch (e) { console.log(' Warning: Failed to cleanup nested dir'); } + } catch (e) { + console.log(` Warning: Failed to move uv from nested dir: ${e.message}`); + } } } }